I have Spring Boot
application with basic auth enabled. UserServiceDetails
consumed from DB. For the unit-testing purpose, I want to mock it, so th
I think you should use @Profile, UserDetailesService
is an interface creates two implementation of UserDetailesService
, one for test and another for the rest of the case
@Component
@Profile("test")
public class UserDetailesServiceTestImpl implements UserDetailesService{
}
@Component
@Profile("!test")
public class UserDetailesServiceImpl implements UserDetailesService{
}