spring-boot整合freemarker 出现404
2021-01-09 08:33
                         标签:mamicode   解决办法   string   request   print   图片   oca   info   span    今天遇到了ftl整合springboot出现的问题 在浏览器输入 localhost:8080/hello   控制台也打印了aaa,index.ftl也写的没有问题。就是出现了这个问题。     解决办法:查看源码,原来默认的是.ftlh结尾的,当然就会出现上面的错误。         修改办法,在application.properties配置文件中添加如下配置       spring-boot整合freemarker 出现404 标签:mamicode   解决办法   string   request   print   图片   oca   info   span    原文地址:https://www.cnblogs.com/orange-time/p/12961990.html@Controller
public class IndexController {
    @RequestMapping("hello")
    public String index(){
        System.out.println("aaa");
        return "index";
    }
}


spring.freemarker.suffix=.ftl
文章标题:spring-boot整合freemarker 出现404
文章链接:http://soscw.com/essay/41129.html