Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我找到了将静态文件存储在/src/main/webapp/和/src/main/resources/static/. 有什么区别,在spring-boot应用程序中存储静态文件的最佳位置是什么?
/src/main/webapp/
/src/main/resources/static/
spring-boot
如果您的资源在src/main/webapp其中,则表明您正在构建 WAR 档案。对于 JARsrc/main/resources来说更合适(例如,/static如果它是启动应用程序)。如果你想把东西放在非标准的地方,这取决于你——你只需要配置构建系统来理解你的意思。
src/main/webapp
src/main/resources
/static