Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot bean级别的RefreshScope正在引发bean初始化异常_Spring Boot_Spring Boot Actuator - Fatal编程技术网

Spring boot 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

我试图在运行时通过在bean级别使用RefreshScope注释点击执行器的刷新端点来刷新bean。但是,当我尝试启动服务器时,我面临以下异常

 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发布
有人能帮我解决这个问题吗