修改Mybatis配置

web_backend_develope
chenlw 8 years ago
parent e1db9642f8
commit ea23038bd0

@ -4,6 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeAliases>
<typeAlias alias="string" type="java.lang.String" />
<typeAlias alias="EncodedInfoEntity" type="com.platform.entities.EncodedInfoEntity" />
<typeAlias alias="DataInfoEntity" type="com.platform.entities.DataInfoEntity" />
<typeAlias alias="PagerOptions" type="com.platform.entities.PagerOptions"/>
@ -11,7 +12,7 @@
<typeAlias alias="DataInfoEntityMoveTmp" type="com.platform.entities.DataInfoEntityMoveTmp"/>
<typeAlias alias="SystemEntity" type="com.platform.entities.SystemEntity"/>
<typeAlias alias="RegionalismEntity" type="com.platform.entities.RegionalismEntity"/>
<typeAlias alias="oracleForm" type="com.platform.entities.oracleForm"/>
<typeAlias alias="oracleForm" type="com.platform.entities.oracleForm"/>
</typeAliases>
<plugins>
@ -19,7 +20,8 @@
</plugin>
</plugins>
<mappers>
<!-- <mappers>
<mapper resource="com/dao/mapper/data-details-mapper.xml" />
<mapper resource="com/dao/mapper/config-details-mapper.xml"/>
<mapper resource="com/dao/mapper/dataInfoMoveTmpmapper.xml"/>
@ -28,6 +30,6 @@
<mapper resource="com/dao/mapper/SystemCodeMapper.xml"/>
<mapper resource="com/dao/mapper/VolumeMapper.xml"/>
</mappers>
-->
</configuration>

@ -22,6 +22,7 @@
http://www.springframework.org/schema/task/spring-task-3.0.xsd">
<!-- 读取db.properties中的属性值 -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="WEB-INF/config/config.properties"></property>
@ -40,13 +41,29 @@
<property name="username" value="${jdbc.mysql.username}" />
<property name="password" value="${jdbc.mysql.password}" />
</bean>
<!-- <bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="WEB-INF/config/mybatis-applicationConfig.xml" />
<property name="dataSource" ref="mySQLDataSource" />
</bean> -->
<bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="WEB-INF/config/mybatis-applicationConfig.xml" />
<property name="dataSource" ref="mySQLDataSource" />
<property name="mapperLocations">
<list>
<value>classpath:com/dao/mapper/*apper.xml</value>
</list>
</property>
</bean>
<!-- mapper扫描器 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.platform.dao,com.dao.mapper" />
<!-- 扫描包路径,如果需要扫描多个包,中间使用半角逗号隔开 -->
<property name="basePackage" value="com/platform/dao"></property>
<property name="sqlSessionFactoryBeanName" value="mySQLSessionFactory" />
</bean>
<!-- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.platform.dao" />
</bean> -->
<!-- 配置声明式事物 事物管理器 -->
<!-- 配置声明式事物 -->
<bean id="mySQLTxManager"

Loading…
Cancel
Save