I am new to Spring and learning the DI. I have three simple classes for an experiment.
But as pointed in code, it keeps giving me NPE. Even using @Autowired in Class3 gives error. Please suggest what am I doing wrong?
If I dont set the scope to be prototype, it works fine. Else it doesn't.
But I need the scope to be prototype since I want this bean to have a new instance everytime its launched (I am calling it using a button click. But I did not include that code for sake of simplification).