第四章、前端集成

集成Thymeleaf的基本方法

集成Bootstrap

集成jQuery

pom.xml文件中添加依賴4個

<!-- 前端模版thymeleaf依賴 -->
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

<!-- thymeleaf官方依賴 -->
<dependency>
	<groupId>org.thymeleaf</groupId>
	<artifactId>thymeleaf</artifactId>
</dependency>

<dependency>
	<groupId>org.thymeleaf</groupId>
	<artifactId>thymeleaf-spring5</artifactId>
</dependency>

<!-- Thymeleaf方言支持SpringSecurity 依賴-->
<dependency>
	<groupId>org.thymeleaf.extras</groupId>
	<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>

結構如下:

WebMvcConfig配置類如下(與We

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章