Spring中的一点知识
1.接收数据设置默认值
[email protected]
3.<mvc:annotation-driven/> <context:component-scan/>
<context:component-scan/>标签是告诉Spring 来扫描指定包下的类,并注册被@Component,@Controller,@Service,@Repository等注解标记的组件。
<mvc:annotation-driven/>是告知Spring,启用注解驱动。然后Spring会自动为我们注册上面说到的几个Bean到工厂中,来处理我们的请求。