![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring mvc
上帝也疯狂12138
这个作者很懒,什么都没留下…
展开
-
<mvc:annotation-driven/>、<context:component-scan base-package=""/>、<context:annotation-config/>的用法
在Spring中表示在自动装配时,我们可以使用注解的方式 例如:@Autowired,但是此时在xml文件中仍需要bean配置,只不过此时代替了bean的property 表示扫描指定的包,将注解的类注册为spring容器中的bean,那么此时我们在xml文件中就不需要定义bean,实现xml文件的零配置 表示在SpringMVC中注册了DefaultAnno转载 2016-03-29 14:19:11 · 380 阅读 · 0 评论 -
spring mvc返回类型总结(主要是对返回路径的总结)
ModelAndView 路径在ModelAndView 对象设置ModelMap 路径为类路径@RequestMapping的值+方法@RequestMapping的值Model 路径为类路径@RequestMapping的值+方法@RequestMapping的值Map 路原创 2016-03-29 14:55:08 · 435 阅读 · 0 评论