Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

BastiOfBerlin/feignclient-refreshscope-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

feignclient-refreshscope-problem

Endpoints

Access

I set server.port=8080

So, for example, simply call http://localhost:8080/random

What happens

DynamicUrlConfiguration registers itself as a Listener for EmbeddedServletContainerInitializedEvent. In my real application I do that to have access to the real port number of my service. In this demo, I simply assign "https://api.chucknorris.io/jokes" to the configuration property the FeignClient (ChuckNorrisApiClient) uses as URL.

As one can see in the startup logs, this value indeed gets assigned to the property. But although calling refreshScope.refreshAll(), the FeignClient annotated with @RefreshScope does not get refreshed.

When you assign "https://api.chucknorris.io/jokes" to the property client.api-url in application.yml, the client works as expected. (Note that I received a 403 Error (Access denied | api.chucknorris.io used Cloudflare to restrict access) in the past. Nevertheless, the correct URL got called.)

Expected behaviour

I would expect the FeignClient to reload upon config changes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages