SpringBoot Web 静态资源访问
//pom.xml的信息配置 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>
诸如访问 ..\src\main\resources\static\bootstrap.min.js Html页面引用该脚本用以下方式=> <script type="text/javascript" src="/bootstrap.min.js"></script>
剖析: 访问当前项目的任何资源,都去(静态资源的文件夹)找映射 classpath:/META‐INF/resources/” classpath:/resources/” classpath:/static/” classpath:/public/”

浙公网安备 33010602011771号