I would like to reuse Spring production context configuration, but replace a few beans with another ones. If I would like to override them with a mock, I would use @MockBean
, which does exactly what I need (overrides bean), but does not allow me to configure a new bean myselves.
I know there is another way to use @ContextConfiguration
but it seems too verbose to me.
Thanks.