Accessing a static resource on Heroku Spring web app via browser

361 Views Asked by At

enter image description here .

I have three static.txts in my project, but a 404 error occurs when I access to https://magicsapp.herokuapp.com/static.txt.

src/main/resources/application.properties has this line,

static.resource.location=/META-INF/resources/

but when I commit, a warning comes:

Warning:(1, 1) Cannot resolve configuration property 'static.resource.location'

Which file (or what path) is actually accessed when I connect to that address?

1

There are 1 best solutions below

0
On

Solved. The answer was src/main/resources/static/static.txt.