79117990

Date: 2024-10-23 12:58:54
Score: 1.5
Natty:
Report link

I think your question is similar to Add one additional bean to "@WebMvcTest".

There are multiple ways to add your bean into slice test context. You can use @Import, @ComponentScan, @TestConfiguration (and create your bean by yourself with new operator).

Reasons:
  • Whitelisted phrase (-1.5): You can use
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @Import
  • User mentioned (0): @ComponentScan
  • User mentioned (0): @TestConfiguration
  • Low reputation (1):
Posted by: snej0keee