alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.03k stars 12.8k forks source link

引入SpringBootAdmin监控导致Nacos热更新配置失效 #3245

Closed LongStayzz closed 4 years ago

LongStayzz commented 4 years ago

引入spring-boot-admin-starter-client导致配置热更新失效

        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
        </dependency>

本地环境: nacos选择1.2.1版本

 <parent>
        <groupId>com.asiainfo</groupId>
        <artifactId>asiainfo-is</artifactId>
        <version>2.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>nacos-spring-cloud-config-example</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.asiainfo</groupId>
            <artifactId>common</artifactId>
            <version>2.0-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
            <version>0.2.1.RELEASE</version>
        </dependency>

        <!--使服务被admin监听-->
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-context</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-openfeign-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

    </dependencies>
KomachiSion commented 4 years ago

There may be bean conflicts bewteen spring-boot-admin-starter-client and nacos

LongStayzz commented 4 years ago

But I didn't find any conflict through dependency analysis.

Is there any better way to guide me to investigate and solve this problem

KomachiSion commented 4 years ago

I mean spring bean conflict, such as some spring bean from spring-boot-admin-starter-client make some spring condition change, which cause nacos' bean can't be injected currently.