Spring boot 考虑定义一个类型的豆和*x27;reactor.core.scheduler.scheduler';在您的配置中
我在Java微服务应用程序中使用SpringBoot2和Spring5。我有必需的依赖项,包括调度程序。构建很好,没有任何编译错误,但在运行时,我在Spring boot 考虑定义一个类型的豆和*x27;reactor.core.scheduler.scheduler';在您的配置中,spring-boot,spring-webflux,Spring Boot,Spring Webflux,我在Java微服务应用程序中使用SpringBoot2和Spring5。我有必需的依赖项,包括调度程序。构建很好,没有任何编译错误,但在运行时,我在PooledAsyncRunner中得到以下错误:- *****************************应用程序无法启动 ***************************描述:com.connector.async.core.PooledAsyncRunner中构造函数的参数0需要类型为的bean 找不到“reactor.core.sc
PooledAsyncRunner
中得到以下错误:-
*****************************应用程序无法启动
***************************描述:com.connector.async.core.PooledAsyncRunner中构造函数的参数0需要类型为的bean
找不到“reactor.core.scheduler.scheduler”。行动:
考虑定义一个类型为“反应堆”的bean。
您的配置
下面是spring主应用程序文件,我在其中明确注释了自动配置:-
@SpringBootApplication
@EnableAutoConfiguration
public class MarketApplication {
}
我在pom.xml中也有反应堆堆芯依赖项
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.1.8.RELEASE</version>
</dependency>
离子交换反应器
堆芯
3.1.8.1发布
请告知。谢谢为什么调度程序是final?我也尝试删除final,但结果仍然相同。@horatius,因为他在构造函数中初始化了?您是否在配置中定义了reactor.core.scheduler.scheduler类型的bean?我将在带有'@Configuration'注释的类中添加'@Bean'公共调度程序GetScheduler(){….},然后检查。您尚未启用调度。你把其他地方也包括在内了吗<代码>@EnableScheduling
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.1.8.RELEASE</version>
</dependency>