Ytord Lamop
Ytord Lamop

Reputation: 31

Setup springboot to display image

I have a rest application who use spring boot 1.4.2 with tomcat embedded

On client side, user can take picture via webcam and save it to the server.

In the server side, i save img in example : /home/test/img/

In my web application what i need to setup to be able to display image?

<img src="paul.jpg"/>

Upvotes: 1

Views: 860

Answers (1)

Stephane Nicoll
Stephane Nicoll

Reputation: 33151

You need to redefine the spring.resources.static-locations property, for instance:

spring.resources.static-locations=classpath:/static/,file:/home/test/img/

Upvotes: 1

Related Questions