Setup:
spring.config.additional-location=classpath:/,classpath:/dev/
Embedded Tomcat has in its root CSS file: META-INF/resources/layout/sv.css
Result: Spring Boot application starts fine, but access to sv.css receives HTTP 404 from Tomcat.
Once spring.config.additional-location parameter remove completely from application.properties, META-INF/resources/layout/sv.css loaded HTTP 200 OK.
application.properties:
server.tomcat.basedir=/home/vs/logs/tomcat
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.pattern=%t %a "%r" %s (%D ms)
server.tomcat.threads.max=20
server.tomcat.threads.min-spare=10
server.tomcat.max-connections=20
server.servlet.context-path=/
spring.mvc.static-path-pattern=/**
spring.mvc.log-request-details=true
Comment From: wilkinsona
Thanks for the report. In itself, config locations (locations from which application.properties and .yaml files are loaded) should not have any effect on static resource loading. For there to be an effect, I would guess that one of the new locations contains a configuration file that is changing static resource configuration. I can only guess as we don't have a complete view of what you're doing and the failure that's occurring.
If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
Comment From: vitsin
ok, spring.config.additional-location works fine on single stand alone Spring Boot project. In my case I have projectA (Spring Boot) as a parent of another Spring Boot ProjectB, but I guess its a different story than. Thanks.