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

spring.cloud.refresh.never-refreshable not ignoring class #1308

Open
nitron2x opened this issue Dec 8, 2023 · 1 comment · May be fixed by #1467
Open

spring.cloud.refresh.never-refreshable not ignoring class #1308

nitron2x opened this issue Dec 8, 2023 · 1 comment · May be fixed by #1467

Comments

@nitron2x
Copy link

nitron2x commented Dec 8, 2023

Describe the bug
Hi folks,

I have a class name set in spring.cloud.refresh.never-refreshable to be ignored for refresh.

This however doesn't work because Spring adds some EnhancerBySpringCGLIB to the class name.

Thus, this snippet org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder#getNeverRefreshable fails when calling getClass().getName()

Sample
1.) set prop: spring.cloud.refresh.never-refreshable=com.sth.IgnoreMe

2.) bean.getClass().getName() - returns during runtime a modified com.sth.IgnoreMe$$EnhancerBySpringCGLIB$$aaffeeaa and the comparison against the prop value of com.sth.IgnoreMe fails.

quaff added a commit to quaff/spring-cloud-commons that referenced this issue Feb 7, 2025
@quaff
Copy link
Contributor

quaff commented Feb 7, 2025

It should be fixed by #1467

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

Successfully merging a pull request may close this issue.

3 participants