Spring boot bean级别的RefreshScope正在引发bean初始化异常
我试图在运行时通过在bean级别使用RefreshScope注释点击执行器的刷新端点来刷新bean。但是,当我尝试启动服务器时,我面临以下异常Spring boot bean级别的RefreshScope正在引发bean初始化异常,spring-boot,spring-boot-actuator,Spring Boot,Spring Boot Actuator,我试图在运行时通过在bean级别使用RefreshScope注释点击执行器的刷新端点来刷新bean。但是,当我尝试启动服务器时,我面临以下异常 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTenantDataFactory' defined in BeanDefinition defined in class path resource [com/azu
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTenantDataFactory' defined in BeanDefinition defined in class path resource [com/azure/redisdemo/RedisConnector.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is java.lang.NullPointerException
我的班级是这样的:
@Configuration
public class ABC {
@Bean
@RefreshScope
public void getXYZ() throws InterruptedException {
}
}
我在pom中使用了以下springcloud依赖项
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
org.springframework.cloud
春云起动器
2.2.6.1发布
有人能帮我解决这个问题吗