Spring——MVC
<!-- Servlet级别的上下文中可以使用root上下文配置的bean,而root上下文中不能使用Servlet界别的上下文中配置的bean -->
<!--更改欢迎页要注意的地方!-->
/* @RequestMapping("/index.jsp")
public String index(){
return "index2";
}*/
/* <!--<mvc:annotation-driven/>
<mvc:view-controller path="/" view-name="index2"/>-->*/
<!--Spring-MVC 查询数据库里的列表。。。,要在web.xml加的代码-->
<!--父上下文的配置-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml</param-value>
</context-param>
<!-- 监听器配置 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!--牛批 联系数据库要初始化父上下文!!看上!-->