问题描述
idea无法解析mvc视图
分析
1.检查依赖:
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-freemarker</artifactid>
</dependency>
2.检查配置文件:
注意template-loader-path的路径配置,看你的ftl文件是否在该文件夹下
freemarker:
cache: false
charset: utf-8
expose-request-attributes: true
expose-session-attributes: true
suffix: .ftl
template-loader-path: classpath:/templates/
resources:
static-locations: classpath:/static/
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。
发表评论