Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级到0.2.8 启动报错 #200

Open
gang0713 opened this issue Jul 3, 2021 · 1 comment
Open

升级到0.2.8 启动报错 #200

gang0713 opened this issue Jul 3, 2021 · 1 comment

Comments

@gang0713
Copy link

gang0713 commented Jul 3, 2021

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'discoveryAutoRegister': Injection of @NacosInjected dependencies is failed; nested exception is java.lang.ClassCastException: com.sun.proxy.$Proxy48 cannot be cast to java.util.Map
at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:149) ~[spring-context-support-1.0.10.jar:?]

Caused by: java.lang.ClassCastException: com.sun.proxy.$Proxy48 cannot be cast to java.util.Map
at com.alibaba.nacos.spring.beans.factory.annotation.AnnotationNacosInjectedBeanPostProcessor.getNacosProperties(AnnotationNacosInjectedBeanPostProcessor.java:145) ~[nacos-spring-context-1.1.0.jar:?]

@AdiHuang
Copy link

    <dependency>
        <groupId>com.alibaba.boot</groupId>
        <artifactId>nacos-config-spring-boot-starter</artifactId>
        <version>0.2.10</version>
        <exclusions>
            <exclusion>
                <groupId>com.alibaba.spring</groupId>
                <artifactId>spring-context-support</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.alibaba.spring/spring-context-support -->
    <dependency>
        <groupId>com.alibaba.spring</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>1.0.11</version>
    </dependency>

升级一下 spring-context-support的版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants