Hello Spring Cloud Config team!

I have a Spring Boot application using Spring Cloud Config Client and I have a controller annotated by @RefreshScope annotation in the application.

At this point, refresh (POST to http://localhost:8889/actuator/refresh) worked for me.

Then, I needed to add the following dependency which (as I understand it) effectively turns on bootstrap.

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

After that, when I send the refresh request the bean is not refreshed and I get the following response:

[
    "spring.cloud.bootstrap.enabled"
]

I noticed, that when bootstrap is used, bean LegacyContextRefresher is created instead of ConfigDataContextRefresher that was used before... but I didn't figure out yet how to make refresh working together with bootstrap.

I tried to investigate myself and even tried to get help on SO (https://stackoverflow.com/questions/66936224/how-to-use-refreshscope-with-enabled-bootstrap), but nobody responded even though there was a bounty, reaching out to you via ticket is the last thing I can think of.

Thank you in advance!

Comment From: spencergibb

We have integration tests that work. Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Comment From: jakub-moravec

Hi @spencergibb, apologies for the delay. Please find the example attached. scc_example.zip To reproduce the issue:

  1. Init the git repos for conf and conf-user-set folders in C:/GIT/conf/ and C:/GIT/conf-user-set/ respectively
  2. start configuration-service (no Spring profile - default profile is used)
  3. start configuration-client (no Spring profile - default profile is used)
  4. open http://localhost:8889/message
  5. change the value in c:\GIT\conf-user-set\manta-admin-gui\default\manta_admin_gui-default.properties, commit the change
  6. send POST to http://localhost:8889/actuator/refresh
  7. open http://localhost:8889/message again, the old value is still there

I hope this helps. Jakub