spring-mybatis整合xml配置
来源:互联网 发布:2016赛季林书豪数据 编辑:程序博客网 时间:2024/06/06 01:31
<?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:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"> <!-- 配置数据源 这里用的是dbcp连接池的数据源--><bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"><property name="driverClassName" value="com.mysql.jdbc.Driver"></property><property name="url"><value>jdbc:mysql://127.0.0.1:3306/smbms?useUnicode=true&characterEncoding=utf-8</value></property><property name="username" value="root"></property><property name="password" value="wenwen"></property></bean><!-- 配置sqlSessionFactoryBean --><bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"><!-- 配置数据源 --><property name="dataSource" ref="dataSource"></property><!-- 引用Mybatis配置文件中的配置 --><property name="configLocation"><value>classpath:mybatis-config.xml</value></property><!-- 配置SQL映射文件 --> <property name="mapperLocations"><list><value>classpath:com/chen/mapping/*.xml</value></list></property></bean><!-- 配置扫描dao --><bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"><property name="basePackage" value="com.chen.mapping"></property></bean><!-- 注解自动扫包 --><context:component-scan base-package="com.chen.serviceImpl,com.chen.mapping"></context:component-scan></beans>
阅读全文
0 0
- Spring+Mybatis整合配置xml
- 【Spring】XML配置整合Mybatis
- spring-mybatis整合xml配置
- maven+Spring+SpringMVC+Mybatis 整合 xml配置
- Spring+Spring Mvc+Mybatis+MySqlite(SSM框架整合Xml配置)
- mybatis整合spring配置
- Spring 整合mybatis配置
- spring整合mybatis配置
- Spring整合配置Mybatis
- spring-mybatis整合配置
- spring+springmvc+druid+oscache+mybatis整合web.xml 配置内容
- mybatis-spring 的整合_配置application.xml
- spring+Mybatis+Ehcache整合(Ehcachec参数说明XML配置)
- spring整合 xml配置
- spring-MyBatis.xml配置
- mybatis 与spring整合配置
- 二、Mybatis-Spring整合配置
- SpringMVC+Spring+Mybatis整合配置
- Linux Shell中各种分号和括号的用法总结
- linux安装showdoc——让你避过大坑
- 如何将现有的/home目迁移新的单独分区上,或者其它目录迁移到别的分区
- angular服务——$http
- 随想
- spring-mybatis整合xml配置
- map
- Java初窥:JDK1.8中的日期处理
- 深度解析京东个性化推荐系统演进史
- 函数模版与类模版template
- java中进行字符串替换.replace() .indexOf() .lastIndexOf() .substring()
- SpringBoot集成Swagger2
- 天堂里的游戏 51Nod
- Oracle数据库中 to_date()函数的用法