![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SpringBoot
Sun_Dean
路漫漫其修远兮
展开
-
路径没有错,怎么访问teamplates下的页面一直404呢?看这里你可能就知道啦
来到这里的小伙伴肯定都已经被404气到不行了…不要问我怎么知道的…首先templates文件夹下的页面是不能在浏览器输入路径直接访问的!!!templates下存放的是项目的动态和模板页面,访问的条件为:1. 从controller中进行跳转2. 需要有视图解析器如thymeleaf,freemarker等模板引擎具体配置可以看一个小例子SpringBoot和freemarker的整合...原创 2020-01-09 20:01:51 · 510 阅读 · 0 评论 -
freemarker在SpringBoot下的使用以及出现的问题
1. 引入maven依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId></dependency>注意这里不指定版本则与Spri...原创 2020-01-09 11:18:03 · 1111 阅读 · 0 评论