Below is the Configuration Class where I am defining the bean. @Configuration @EnableWebMvc @ComponentScan(basePackages = { "com.abc.billing.web.controllers", "com.abc.billing.core.services" }) @Import(PersistenceConfig.class) public class WebAppConfig extends WebMvcConfigurerAdapter { @Override public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { converters.add(new MappingJackson2HttpMessageConverter()); } @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new BusinessUnitInterceptor()); } @Bean public TripsExpiryTask tripsExpiryTask() { return new TripsExpiryTask(); } @Bean public […]
The post Unable to autowire bean in a class appeared first on BlogoSfera.