Thymeleaf中顯示ajax請求所需依賴
<!--所需依賴-->
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <!--去除HTML 嚴格規范-->
<dependency> <groupId>net.sourceforge.nekohtml</groupId> <artifactId>nekohtml</artifactId> <version>1.9.22</version> </dependency>
控制器中支持ajax請求的注解@ResponseBody
springboot與SSM中的控制器支持ajax請求方法沒有區別
@ResponseBody寫在控制器的方法上,只表示本方法適合ajax請求
@ResponseBody寫在控制器類上,表示該類中所有方法適合ajax請求
怎樣在Thymeleaf中顯示ajax請求到的數據

