小编Ama*_*los的帖子

创建名称为 bean 时出错:自动装配依赖项注入失败,无法解析占位符

我正在尝试在 tomcat 服务器上运行我的应用程序(spring + hibernate),但出现这些错误。当我评论导致错误的属性时,下一个属性会触发相同的错误。我猜想在初始化期间无法识别这些属性,我尝试了很多解决方案,但没有一个解决问题。有谁有办法解决这个问题吗?

堆栈跟踪

2019-06-17 15:07:19.706  INFO 12736 --- [on(5)-127.0.0.1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 5442 ms
2019-06-17 15:07:19.737  WARN 12736 --- [on(5)-127.0.0.1] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'san.prm.webservices.config.WebConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'maxAttachmentSize' in value "${maxAttachmentSize}"
2019-06-17 15:07:19.752  INFO 12736 --- [on(5)-127.0.0.1] utoConfigurationReportLoggingInitializer : 

Error …
Run Code Online (Sandbox Code Playgroud)

java spring spring-boot

13
推荐指数
1
解决办法
6万
查看次数

标签 统计

java ×1

spring ×1

spring-boot ×1