问答详情
源自:6-2 SpringBoot 整合thymeleaf

找不出代码问题,访问报错

报错

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Thu Oct 25 09:57:57 CST 2018

There was an unexpected error (type=Internal Server Error, status=500).

Error resolving template "thymeleaf/center/center", template might not exist or might not be accessible by any of the configured Template Resolvers


提问者:安东 2018-10-25 10:04

个回答

  • 安东
    2018-10-25 10:32:46

    原来是最后少了个斜杠

    spring.freemarker.template-loader-path=classpath:/templates/


  • 安东
    2018-10-25 10:30:45

    spring.thymeleaf.prefix=classpath:/templates

    我把配置文件里上面这行注释就可以访问了,不知道为什么