jar:
自动装配
springboot帮我们配置了什么
- xxxxAutoConfiguration 向容器中自动装配组件
- xxxxProperties 自动装配类,装配配置文件中自定义的一些内容
要
静态资源
1.在springboot,我们可以用以下方式处理静态资源
- webjars
localhost:8080/webjars/
- public, ststic, /**, resources
localhost:8080/
2.优先级:resource>static(默认)>public
首页定制
在templates下的所有页面,只能通过controller来跳转
favicon.ico
Thymeleaf
遍历数组
<h3 th:each="user:${users}" th:text="${user}"></h3>
或
<h3 th:each="user:${users}">[[ ${user} ]]</h3>