Код: Выделить всё
@Service
SomeService {
@Autowired
public SomeService(SomeConfig config)
}
@Configuration
@Getter
@Setter
public class SomeConfig {
private String someValue;
}
< /code>
В моем тесте я делаю следующее: < /p>
@MockBean
SomeConfig someConfig;
@Autowired
SomeService someService;
Подробнее здесь: https://stackoverflow.com/questions/659 ... e-injected