No mapping for GET /css/bootstrap.min.css
springboot 使用thymeleaf 下的页面的css等样式显示不出来。
MyMvcConfig.java内加上这两个函数
解决方案
@enablewebmvc记得要去掉,
enablewebmvc它会让你的静态资源链接无法加载,是引入webmvcconfigurationsupport的,也就是spring会跳过springboot的自动装配(也就是webmvautoconfiguration),会扫描不到src/main/resource/static下的静态资源,但如果使用@enableautoconfiguration注解会读取呀妹儿(yaml)和properties的配置,



