-
Notifications
You must be signed in to change notification settings - Fork 41.1k
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
@MockBean does not work for @RefreshScope bean #5724
Comments
FYI, I currently use this approach, which works perfectly. The |
I've made a stab at a fix here, using a It gets all Am I on the right track here? Would this form the basis of some kind of test auto configuration in the Spring Cloud Config project? |
BTW, |
The |
@philwebb I have created an Issues Pull Request incorporating your feedback. |
Thanks @colin-shine |
Sample project:
https://github.com/colin-shine/mockbean-issue
Run the
MyTest
to see the problem.Spring Boot:
v1.4.0.M2
Spring Cloud Config:
1.1.0.RC2
@MockBean
detects 2 beans instead of one:The text was updated successfully, but these errors were encountered: