Spring中的一点知识

1.接收数据设置默认值

Spring中的一点知识

[email protected]

Spring中的一点知识

3.<mvc:annotation-driven/>      <context:component-scan/>

<context:component-scan/>标签是告诉Spring 来扫描指定包下的类,并注册被@Component,@Controller,@Service,@Repository等注解标记的组件。

<mvc:annotation-driven/>是告知Spring,启用注解驱动。然后Spring会自动为我们注册上面说到的几个Bean到工厂中,来处理我们的请求。

 

[email protected]

Spring中的一点知识

[email protected]

Spring中的一点知识

Spring中的一点知识

6.修改响应头信息(乱码问题)

Spring中的一点知识