【Spring】整合SpringMVC、MyBatis

来源:互联网 发布:中南大学大数据专业 编辑:程序博客网 时间:2024/06/05 19:08

在使用xml配置方式的最佳整合方式:

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"    xsi:schemaLocation="     http://www.springframework.org/schema/beans      http://www.springframework.org/schema/beans/spring-beans-4.0.xsd     http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-4.0.xsd     http://www.springframework.org/schema/aop      http://www.springframework.org/schema/aop/spring-aop-4.0.xsd     http://www.springframework.org/schema/context     http://www.springframework.org/schema/context/spring-context-4.0.xsd"><!-- 整合mybatis --><import resource="classpath:spring-mybatis.xml"/><!-- 事务控制 --><import resource="classpath:spring-transaction.xml"/><!-- springMVC配置 --><import resource="classpath:springMVC.xml"/></beans>


0 0
原创粉丝点击