2020
12-22
12-22
springboot返回html和jsp的方法示例
一、返回html(1)添加maven依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency>(2)thymeleaf模板默认寻找resources下,templates文件夹放html页面,static文件夹放css及js(3)引入js,需要使用如下格式<htmllang="en"xmlns:th="http://www.thymeleaf.org"><scripttype="text/javascript"th:src="@{/js/jquery/jquery.min.js}"></script...
继续阅读 >