I am using Spring Boot in my project and registering a Bean
as follows:
@Bean
public Config registerBean() {
Config config = new Config();
config.setTest(test);
return config;
}
When I try to acquire the bean, I am getting a NullPointerException
.
public class PdiClient {
@Autowired
private Config appConfig;
}
Any idea on what causing the null pointer?