Giter Site home page Giter Site logo

Comments (7)

Anilople avatar Anilople commented on June 26, 2024

Spring Boot version?

run

mvn dependency:tree > tree.log

get it.

from apollo-use-cases.

Sam0913 avatar Sam0913 commented on June 26, 2024

Spring Boot version?

run

mvn dependency:tree > tree.log

get it.

2.1.5.RELEASE

from apollo-use-cases.

Sam0913 avatar Sam0913 commented on June 26, 2024

Spring Boot version?

run

mvn dependency:tree > tree.log

get it.

@RefreshScope 如果使用这种方式虽然可以动态更新了,但是会导致eureka 注册当前服务进行先down 在 up操作。

from apollo-use-cases.

nobodyiam avatar nobodyiam commented on June 26, 2024

You could refresh the specific bean with the bean name, e.g.
https://github.com/apolloconfig/apollo/blob/96ee53a2c98da763ef0e7557af33c03a8d2ae297/apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/spring/springBootDemo/refresh/SpringBootApolloRefreshConfig.java#L47-L53

from apollo-use-cases.

nobodyiam avatar nobodyiam commented on June 26, 2024

BTW, I verified EnvironmentChangeEvent also works in spring boot 2.4.12 and spring cloud 2020.0.4. If it doesn't work for your scenario, please take a look at your ConfigurationProperties setup and make sure it is not annotated with RefreshScope.

from apollo-use-cases.

Sam0913 avatar Sam0913 commented on June 26, 2024

BTW, I verified EnvironmentChangeEvent also works in spring boot 2.4.12 and spring cloud 2020.0.4. If it doesn't work for your scenario, please take a look at your ConfigurationProperties setup and make sure it is not annotated with RefreshScope.

恩,是我只写取application错误了,请问@RefreshScope 会导致服务重启的问题您遇过吗?

from apollo-use-cases.

nobodyiam avatar nobodyiam commented on June 26, 2024

恩,是我只写取application错误了,请问@RefreshScope 会导致服务重启的问题您遇过吗?

@Sam0913 You need to refresh a specific bean instead of refresh all. But I think even refresh all will only trigger eureka to unregister and register itself but won't restart the service.

from apollo-use-cases.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.