1.按照之前的框架配置,我们已经配置好了mybatis 同时在新建的application 中已经配置好了aop 和事务
现在需要将他们全都配置到web.xml中
2.在web.xml中配置如下:
1.配置监听:
<!-- 配置监听 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
2.初始化容器
<!-- 初始化加载容器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml,classpath:applicationContext-dao.xml</param-value>
</context-param>