1.spring boot默认加载文件的路径是
/META-INF/resources/
/resources/
/static/
/public/
这些目录下面, 当然我们也可以从spring boot源码也可以看到
private static final String[] CLASSPATH_RESOURCE_LOCATIONS = { "classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/" };
所有本地的静态资源都配置在了classpath下面了, 而非在webapp下了
2.目录结构详见附件
项目地址https://github.com/leelance/spring-boot-all