我遇到错误,有人可以告诉我怎么了。我无法确定。

2020-03-01 22:26:02.946  INFO 15968 --- [           main] h.HappyconnectswebApiApplication         : Starting HappyconnectswebApiApplication on MYDLNG with PID 15968 (D:\happyconnects\happyconnectsweb-api\target\classes started by Ravikumar Kubusada in D:\happyconnects\happyconnectsweb-api)
2020-03-01 22:26:02.981  INFO 15968 --- [           main] h.HappyconnectswebApiApplication         : The following profiles are active: dev
2020-03-01 22:26:06.008  INFO 15968 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-03-01 22:26:06.212  INFO 15968 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 171ms. Found 1 JPA repository interfaces.
2020-03-01 22:26:08.323  INFO 15968 --- [           main] ptablePropertiesBeanFactoryPostProcessor : Post-processing PropertySource instances
2020-03-01 22:26:08.532  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
2020-03-01 22:26:08.533  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource servletConfigInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2020-03-01 22:26:08.533  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource servletContextInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2020-03-01 22:26:08.534  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper
2020-03-01 22:26:08.534  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableMapPropertySourceWrapper
2020-03-01 22:26:08.534  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2020-03-01 22:26:08.534  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationConfig: [classpath:/application-dev.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2020-03-01 22:26:08.534  INFO 15968 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationConfig: [classpath:/application.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2020-03-01 22:26:09.285  WARN 15968 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.scheduling.annotation.ProxyAsyncConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncConfiguration' defined in file [D:\happyconnects\happyconnectsweb-api\target\classes\com\happyconnects\web\api\config\AsyncConfiguration.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.happyconnects.web.config.HappyConnectsProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2020-03-01 22:26:09.329  INFO 15968 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-03-01 22:26:09.996 ERROR 15968 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************


描述:

Parameter 0 of constructor in com.happyconnects.web.api.config.AsyncConfiguration required a bean of type 'com.happyconnects.web.config.HappyConnectsProperties' that could not be found.


行动:

Consider defining a bean of type 'com.happyconnects.web.config.HappyConnectsProperties' in your configuration


提前致谢

最佳答案

挠头2小时后,发现@ComponentScan可能起作用,并且起作用了。在配置类上使用@ComponentScan。

关于java - 创建名称为“org.springframework.scheduling.annotation.proxyasyncconfiguration”的bean时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/60477583/

10-10 09:08