Where should I store static resources when I build

2019-04-06 11:03发布

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?

1条回答
相关推荐>>
2楼-- · 2019-04-06 11:14

If your resources are in src/main/webapp that suggests you are building a WAR archive. And for a JAR src/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.

查看更多
登录 后发表回答