[英]Why I can't get my freemarker template page (Spring)?
I get 404 not found.我得到 404 未找到。 What do I do wrong?
我做错了什么?
@GetMapping(PRIVACY_POLICY_ENDPOINT)
public String getPrivacyPolicyPage() {
return "/privacyPolicy.ftlh";
}
Path:小路:
src/main/resources/templates/privacyPolicy.ftlh
Gradle: Gradle:
implementation "org.springframework.boot:spring-boot-starter-freemarker"
implementation "org.springframework.boot:spring-boot-starter-web"
I tried to set properties, but it didn't help我试图设置属性,但它没有帮助
freemarker:
enabled: true
template-loader-path: classpath:/templates
suffix: .ftlh
Problem was solved by deleting.ftlh from return通过从返回中删除.ftlh 解决了问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.