0

我正在学习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

4

0 回答 0