I think read open source code is a good way to learn programming skill.DI is very important in OO programming,and Spring is a very power IoC container in Java world.So I choose Spring to learn.
If you want to read a software’s code,you should start with it’s entry point.I think may be Spring MVC is a entry point for Spring.So we can start with Spring MVC,and then go into Spring internal.
Spring MVC is a MVC framework,and it’s base on Spring IoC container,so it’s very flexible.You can write like this to create a controller:
1: @Controller
)
class HomeController
4: {
)
public ModelAndView index()
7: {
);
9: }
10:
,method=RequestMethod.POST)
public ModelAndView login(User user)
13: {
//do something
new ModelAndView(...);
16: }
17: }