Springmvc common components, annotations, jumps, springmvc annotations
| Path ing |
XXXHandlerMapping |
With the development of more and more Configuration |
Annotations to java code to simplify xml configuration |
Requested Controller |
| Controller bean |
Controller |
With more and more development configurations |
Annotations to java code to simplify xml configuration |
Process specific Http requests |
| Business Processing, database team Cao |
Springmvc is not a concern. |
Springmvc is not a concern. |
Springmvc is not a concern. |
Springmvc is not a concern. |
| View parser |
XXViewResolver |
Configure only once |
No need to simplify |
|
Returns the String + ModelMap attribute. String indicates the view name. ModelMap is equivalent to a request. You can put a key-Value Pair and use el to set the value. ModelAndView SetViewName AddObject (key, value) Map None. A view name is provided by default.
You can also refer to: http://blog.csdn.net/sunhuwh/article/details/41727257
Redirect method:
// Return new ModelAndView ("start ");
Return new ModelAndView ("forward: // WEB-INF/pages/testForward. jsp ");
// Return new ModelAndView ("redirect: http://www.baidu.com ");