微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法将“spring.freemarker”下的属性绑定到 ...FreeMarkerTemplateAvailabilityProvider

如何解决无法将“spring.freemarker”下的属性绑定到 ...FreeMarkerTemplateAvailabilityProvider

我正在学习 spring-native,看看它是如何工作的。我刚刚从 start.spring.io/ 创建了一个演示项目,我有 freemarker 作为依赖项和一个控制器,还没有使用 freemarker。但是当我运行 docker 时出现以下错误

2021-06-01 18:38:43.799  INFO 1 --- [           main] o.s.nativex.NativeListener               : This application is bootstrapped with code generated with Spring AOT

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__,| / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.0)

2021-06-01 18:38:43.800  INFO 1 --- [           main] com.example.demo.DemoApplication         : Starting DemoApplication using Java 11.0.10 on bc6534630683 with PID 1 (/workspace/com.example.demo.DemoApplication started by cnb in /workspace)
2021-06-01 18:38:43.800  INFO 1 --- [           main] com.example.demo.DemoApplication         : No active profile set,falling back to default profiles: default
2021-06-01 18:38:43.815  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDeFinitionStoreException: Failed to process import candidates for configuration class [com.example.demo.DemoApplication]; nested exception is java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration
2021-06-01 18:38:43.816  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-06-01 18:38:43.816 ERROR 1 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION Failed TO START
***************************

Description:

Failed to bind properties under 'spring.freemarker' to org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityProperties:

    Reason: org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityProperties.<init>()

Action:

Update your application's configuration

我试图排除 FreeMarkerAutoConfiguration,认为这可能是罪魁祸首,但没有解决,有什么建议吗?你可以在这里找到复制器https://github.com/spring-projects-experimental/spring-native/issues/803

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。