I have a class being @Autowired in inner class. But while executing it throws a Null Pointer Exception, whereas it works fine when Autowired in outer class
class outer {
...
class inner {
@Autowired
private var somevar;
private process () {
somevar.someMethod();
}
}
Any idea why this is not working? 'somevar.someMethod();' line is generating NPE.
 
Aucun commentaire:
Enregistrer un commentaire