1.Spring boot
⒈. XXXAutoConfiguration :获取自动xxx的配置类
⒉.XXXProperties:自动配置类装配配置文件中自定义的内容
⒊. 导入静态资源:webMvcAutoConfiguration webMvcAutoConfigurationAdapter webMvcProperties addResourceHandler
可以放置静态资源的几个位置:
1.classpath指springboot工程src目录下的resource目录:
2.路径:maven: /webjars/**
3.classpath:/META-INF/resources/ ; classpath:/resources/; classpath:/public/; classpath:/static/; 优先级: resource>static>public
4.templates目录下所有页面html,只能通过对应的controller访问;通过thymeleaf模板引擎访问;
4.首页
1.http://localhost:8080/ 访问/首页 顺序:(静态资源访问顺序)
1. resources/META-INF/resources/index.html
2. resources/resource/index.html
3. resources/static/index.html
4. resources/public/index.html
2.favicon: <link rel="shortcut icon" href="/favicon.ico"/> /resources/** 静态文件夹底下加图片favicon.ico
5.JSP 模板引擎thymeleaf :<html xmlns:th="http://www.thymeleaf.com">
1./resources/templates/*.html 下的所有html页面,都有thymeleaf引擎模板接管。
2.thymeleaf语法规则:th:元素名 th:text="${xx}"
6.装配扩展SpringMVC
7.增删改查
8.拦截器
9.国际化
原文:https://www.cnblogs.com/chencn/p/12241560.html