java - 创建名为“org.springframework.scheduling.annotation.proxyasyncconfiguration”的bean时出错
问题描述
我得到以下错误,有人可以告诉我出了什么问题。我无法识别。
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 可能有效,并且有效。在您的 Configuration 类上使用 @ComponentScan。
推荐阅读
- jquery - Jquery通过多规格查找
- c - C 中的缓冲和文件 I/O
- reactjs - 反应函数中的映射函数错误
- javascript - 完全删除笔记项目
- javascript - 电容器 - 如何更改手机语言上的应用名称
- php - MYSQL计算一行的不同值与另一行的不同值
- ruby-on-rails - 如何通过 rails api 的响应重新加载特定的部分值?
- flask - 如何解决 CS50 最终项目的 Flask 中的“jinja2.exceptions.UndefinedError: 'nutrition' is undefined”错误
- sql-server - 数据类型为 Money 的 MS SQL Server 字段在 MS ACCESS 链接表中显示空字段
- html - 在 jekyll 主题站点文件中找不到某些图标