Last time, I was kind of frustrated as well as lazy about my problem. As a recap, I had a problem with manually injecting beans in Spring 3.0 because I tried doing it the old fashioned way. After a long time of reading and thinking, I realized that I’m having problems because I didn’t embrace the sudden transition I had with annotations.
Since I’m the kind of person who embraces change, I decided to stop whining and use the auto wiring feature instead. I added the @Autowired annotation to the setter method inside the controller:
Actually, now that I’ve thought about it already, I find the use of annotations much better and cleaner than the old method. It takes a while to learn for it to be readable enough though. It took me about half a day of reading to actually realize how cool annotations are. I even used multiple references to learn this.
As of now, I’m learning how Spring works little by little. I even finished a few chapters on the book that I’m reading. As of now, I’m trying out how to make Spring-MVC work with Google App Engine, but I think I’ll cover that on another entry.