springboot 集成freemarker报错(找不到视图文件路径)

在尝试集成Freemarker到SpringBoot项目时,遇到了内部服务器错误500,提示视图路径[index]会再次重定向到当前URL。问题在于配置文件未正确设置。控制器期望找到resources/templates/index.ftl,但报错找不到该文件。经过排查,发现不是Fremarker依赖问题,也不是模板文件问题,而是application.properties缺少必要的配置。解决方案是在application.properties中添加Freemarker的相关配置,从而解决了问题。
摘要由CSDN通过智能技术生成

springboot 集成freemarker报错

在尝试用springboot集成freemarker时候出了一点小问题,报错信息如下:

There was an unexpected error (type=Internal Server Error, status=500).
Circular view path [index]: would dispatch back to the current handler URL [/system/index] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

控制器是这样写的:

@RequestMapping("/system")
@Controller
public class SystemController {
   
    
	
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值