IDEA报错:Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled. ('crmWatcherService’错误),

单表插入项目,插入前正常,插入后运行webapplication报错:

run:

IDEA报错:rror starting ApplicationContext. To display the auto-configuration report re-run your applic

debug:

IDEA报错:rror starting ApplicationContext. To display the auto-configuration report re-run your applic

于webapplication报错:

Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘crm.watcher.get.db.slave.status.url’ in value “${crm.watcher.get.db.slave.status.url}”

IDEA报错:rror starting ApplicationContext. To display the auto-configuration report re-run your applic

log:
IDEA报错:rror starting ApplicationContext. To display the auto-configuration report re-run your applic

1 2017-12-09 13:02:04.251 WARN 8600 — [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘crmWatcherService’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘crm.watcher.get.db.slave.status.url’ in value “crm.watcher.get.db.slave.status.url"22017120913:02:04.253INFO8600[main]s.c.a.AnnotationConfigApplicationContext:Closingorg.springframework.context.annotation.AnnotationConfigApplicationContext@55fc6344:startupdate[SatDec0913:02:00CST2017];parent:org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1d25c1c32017120913:02:04.255INFO8600[main]o.apache.catalina.core.StandardService:StoppingserviceTomcat42017120913:02:04.279INFO8600[main]utoConfigurationReportLoggingInitializer:56ErrorstartingApplicationContext.Todisplaytheautoconfigurationreportrerunyourapplicationwithdebugenabled.72017120913:02:04.292ERROR8600[main]o.s.boot.SpringApplication:Applicationstartupfailed89org.springframework.beans.factory.BeanCreationException:ErrorcreatingbeanwithnamecrmWatcherService:Injectionofautowireddependenciesfailed;nestedexceptionisjava.lang.IllegalArgumentException:Couldnotresolveplaceholdercrm.watcher.get.db.slave.status.urlinvalue"{crm.watcher.get.db.slave.status.url}" 2 2017-12-09 13:02:04.253 INFO 8600 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing org.spring[email protected]55fc6344: startup date [Sat Dec 09 13:02:00 CST 2017]; parent: org.springframework.boot[email protected]1d25c1c 3 2017-12-09 13:02:04.255 INFO 8600 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat 4 2017-12-09 13:02:04.279 INFO 8600 --- [ main] utoConfigurationReportLoggingInitializer : 5 6 Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 7 2017-12-09 13:02:04.292 ERROR 8600 --- [ main] o.s.boot.SpringApplication : Application startup failed 8 9 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'crmWatcherService': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'crm.watcher.get.db.slave.status.url' in value "{crm.watcher.get.db.slave.status.url}”
10 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
11 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
12 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
13 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
14 at org.springframework.beans.factory.support.AbstractBeanFactory1.getObject(AbstractBeanFactory.java:306) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]15atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]16atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]17atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]18atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]19atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) [springcontext4.3.7.RELEASE.jar:4.3.7.RELEASE]20atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) [springcontext4.3.7.RELEASE.jar:4.3.7.RELEASE]21atorg.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [springboot1.5.2.RELEASE.jar:1.5.2.RELEASE]22atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)[springboot1.5.2.RELEASE.jar:1.5.2.RELEASE]23atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)[springboot1.5.2.RELEASE.jar:1.5.2.RELEASE]24atorg.springframework.boot.SpringApplication.run(SpringApplication.java:314)[springboot1.5.2.RELEASE.jar:1.5.2.RELEASE]25atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1162)[springboot1.5.2.RELEASE.jar:1.5.2.RELEASE]26atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1151)[springboot1.5.2.RELEASE.jar:1.5.2.RELEASE]27atcom.mobcb.platform.WebApplication.main(WebApplication.java:36)[classes/:na]28Causedby:java.lang.IllegalArgumentException:Couldnotresolveplaceholdercrm.watcher.get.db.slave.status.urlinvalue"1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 15 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 16 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 17 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 18 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 19 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE] 20 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE] 21 at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE] 22 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE] 23 at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE] 24 at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE] 25 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE] 26 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE] 27 at com.mobcb.platform.WebApplication.main(WebApplication.java:36) [classes/:na] 28 Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'crm.watcher.get.db.slave.status.url' in value "{crm.watcher.get.db.slave.status.url}"
29 at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]
30 at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]
31 at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]
32 at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210) ~[spring-core-4.3.7.RELEASE.jar:4.3.7.RELEASE]
33 at org.springframework.context.support.PropertySourcesPlaceholderConfigurer2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172) [springcontext4.3.7.RELEASE.jar:4.3.7.RELEASE]34atorg.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:831) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]35atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1086) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]36atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) [springbeans4.3.7.RELEASE.jar:4.3.7.RELEASE]37atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE] 34 at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:831) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 35 at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1086) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 36 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE] 37 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
38 at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
39 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
40 … 17 common frames omitted
41
42 Disconnected from the target VM, address: ‘127.0.0.1:61069’, transport: ‘socket’
43
44 Process finished with exit code 1
View Code

解决方法:

IDEA报错:rror starting ApplicationContext. To display the auto-configuration report re-run your applic

之后要启动:
IDEA报错:rror starting ApplicationContext. To display the auto-configuration report re-run your applic

相关文章:

  • 2021-03-31
  • 2021-10-19
  • 2021-10-08
  • 2021-12-06
猜你喜欢
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-04-24
  • 2022-12-23
  • 2021-11-09
相关资源
相似解决方案