79694271

Date: 2025-07-08 12:56:40
Score: 2
Natty:
Report link

But sadly all answers that state "just move from @MockBean to @MockitoBean" oversee that behavior has changed.

While i have a Testclass with a @MockBean at field level i avoid that the real Bean from application context is created.
With just the move to @MockitoBean the real Bean from the app context is now created additonally.

Behavior is different. While with the old behavior i could do the trick to 'disable' the creation of my real Bean which else will trigger some Quobyte polling for example i cant do it anymore.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @MockBean
  • User mentioned (0): @MockitoBean
  • User mentioned (0): @MockBean
  • User mentioned (0): @MockitoBean
  • Low reputation (1):
Posted by: dcToro