I have problem with NoSuchBeanDefinitionException.
@Component
public class Monitor {
private List<String> urlsToCheckState;
@Autowired
ServerConfig config;
public Monitor(config config, List<String> urlsToCheckState){
urlsToCheckState.add("state1");
}
I understand that Spring can not find Bean which return list of String. I was looking for solution but coudn't find anything which solve my problem. Here is my error.
Error creating bean with name 'Monitor' defined in file [C:\Users]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.util.List' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}