1 在pom.xml加入 <parent> <groupId>org.springframework.boot</groupId> <artif ...
springboot默认是不支持jsp的 注意pom.xml是否添加了thymeleaf的依赖 lt dependency gt lt groupId gt org.springframework.boot lt groupId gt lt artifactId gt spring boot starter thymeleaf lt artifactId gt lt dependency gt t ...
2018-07-06 14:32 0 4040 推荐指数:
1 在pom.xml加入 <parent> <groupId>org.springframework.boot</groupId> <artif ...
pom.xml application.yml web层 html 测试 ...
1、pom.xml文件中要引入themyleaf 2、在application.properties文件中加入 ...
springboot中如果想访问html页面,不每访问一个页面就写一个Controller,可以统一写一个公共的controller方法 代码: (1)引入hutool工具依赖 (2)公共Controller (3)访问页面路径 如页面路径在demo下,配置文件中 ...
在pom.xml加入 在resources\templates\hello.html 在Controller中加入 启动,然后输入localhost:8080/hello 会跳转到页面 注意:必须加入thymeleaf包,不然找不到 ...
springboot中如果想访问html页面,不每访问一个页面就写一个Controller,可以统一写一个公共的controller方法 代码: (1)引入hutool工具依赖 (2)公共Controller (3)访问页面路径 如页面路径在demo下,配置文件中 ...
1. springboot项目访问html页面 记录一下在springboot项目中如何访问html页面的配置,免得每次需要的时候又得到处去找,找了又忘 2. 创建一个基于springboot框架的web应用,不需要其它依赖 3. application.properties ...
参考 https://blog.csdn.net/qq_25091649/article/details/88429512 情况一:在主类直接写controller接口,能够访问到 @SpringBootApplication @RestController public class ...