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: }

相关文章:

  • 2021-12-17
  • 2022-12-23
  • 2021-12-05
  • 2021-07-15
  • 2021-05-28
  • 2021-10-21
  • 2021-08-30
  • 2021-08-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-02-04
  • 2021-08-24
相关资源
相似解决方案