I've found samples that stores static files in /src/main/webapp/
and /src/main/resources/static/
. What's the difference and what's the best place to store static files in spring-boot
app?
相关问题
- java.lang.IllegalArgumentException: Cannot set to
- Could not read entry … from cache taskArtifacts.bi
- Spring Data MongoDB - lazy access to some fields
- Declaring an explict object dependency in Spring
- Decoding body parameters with Spring
相关文章
- java JDK动态代理和cglib动态代理最后获取的代理对象都为null的问题
- org.xml.sax.SAXParseException; lineNumber: 7; colu
- SpringMVC如何把File封装到Map中?
- Spring: controller inheritance using @Controller a
- Android BuildConfig Field generating String incorr
- How to load @Configuration classes from separate J
- Java spring framework - how to set content type?
- Java/Spring MVC: provide request context to child
If your resources are in
src/main/webapp
that suggests you are building a WAR archive. And for a JARsrc/main/resources
is more appropriate (eg in/static
if it's a boot app). It's up to you though if you want to put stuff in non standard places - you just have to configure the build system to understand what you mean.