2013年12月8日
摘要: is used to activate annotations in beans already registered in the application context (no matter if they were defined with XML or by package scanning).can also do whatdoes butalso scans packages to find and register beans within the application context.I'll use some examples to show the differe 阅读全文
posted @ 2013-12-08 22:36 sidesky 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 自己看了官方文档,也到网上查了下,目前理解如下:相当于注册了DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter两个bean,配置一些messageconverter。即解决了@Controller注解的使用前提配置。是对包进行扫描,实现注释驱动Bean定义,同时将bean自动注入容器中使用。即解决了@Controller标识的类的bean的注入和使用。一开始我在写配置的时候,只写了,并没有使用,servlet拦截*.do,.do请求可以被正确捕捉和处理。代码如下mvc-servlet.xmlJava代码 web.xmlJ 阅读全文
posted @ 2013-12-08 21:40 sidesky 阅读(389) 评论(0) 推荐(0) 编辑