|
@@ -1,87 +0,0 @@
|
|
|
-<?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" xmlns:p="http://www.springframework.org/schema/p"
|
|
|
- xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
|
|
|
- xmlns:cache="http://www.springframework.org/schema/cache"
|
|
|
- xsi:schemaLocation="
|
|
|
- http://www.springframework.org/schema/beans
|
|
|
- http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
|
- http://www.springframework.org/schema/context
|
|
|
- http://www.springframework.org/schema/context/spring-context.xsd
|
|
|
- http://www.springframework.org/schema/tx
|
|
|
- http://www.springframework.org/schema/tx/spring-tx.xsd
|
|
|
- http://www.springframework.org/schema/aop
|
|
|
- http://www.springframework.org/schema/aop/spring-aop.xsd
|
|
|
- http://www.springframework.org/schema/cache
|
|
|
- http://www.springframework.org/schema/cache/spring-cache-3.2.xsd">
|
|
|
-
|
|
|
-
|
|
|
- <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
|
|
|
- <property name="dataSource" ref="dataSource" />
|
|
|
- </bean>
|
|
|
-
|
|
|
- <tx:annotation-driven transaction-manager="txManager" />
|
|
|
-
|
|
|
- <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
|
|
- <property name="dataSource" ref="dataSource" />
|
|
|
- </bean>
|
|
|
-
|
|
|
- <!-- enable autowire -->
|
|
|
- <context:annotation-config />
|
|
|
-
|
|
|
- <!-- enable transaction demarcation with annotations
|
|
|
- <tx:annotation-driven />-->
|
|
|
-
|
|
|
- <!--<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">-->
|
|
|
- <bean id="sqlSessionFactory" class="org.apache.mybatis.jpa.MyBatisSessionFactoryBean">
|
|
|
- <property name="timeout" value="30" />
|
|
|
- <property name="dataSource" ref="dataSource" />
|
|
|
- <property name="mapperLocations" value="classpath*:/org/maxkey/persistence/mapper/xml/mysql/*.xml" />
|
|
|
- <property name="typeAliasesPackage"
|
|
|
- value="
|
|
|
- org.maxkey.domain,
|
|
|
- org.maxkey.domain.apps,
|
|
|
- " />
|
|
|
- <property name="transactionFactory">
|
|
|
- <bean class="org.apache.ibatis.transaction.managed.ManagedTransactionFactory" />
|
|
|
- </property>
|
|
|
- <property name="interceptors">
|
|
|
- <list>
|
|
|
- <bean class="org.apache.mybatis.jpa.StatementHandlerInterceptor">
|
|
|
- <property name="dialectString" value="org.apache.mybatis.jpa.dialect.MySQLDialect"/>
|
|
|
- </bean>
|
|
|
- </list>
|
|
|
- </property>
|
|
|
- </bean>
|
|
|
-
|
|
|
- <!-- scan for mappers and let them be autowired -->
|
|
|
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
|
|
- <property name="basePackage"
|
|
|
- value="
|
|
|
- org.maxkey.persistence.mapper,
|
|
|
- " />
|
|
|
-
|
|
|
- </bean>
|
|
|
-
|
|
|
- <!-- enable component scanning (beware that this does not enable mapper scanning!) -->
|
|
|
- <context:component-scan base-package="org.maxkey.persistence.service" />
|
|
|
-
|
|
|
- <bean class ="org.apache.mybatis.jpa.id.IdentifierGeneratorFactory">
|
|
|
- <!--
|
|
|
- <property name="generatorStrategyMap" >
|
|
|
- <map>
|
|
|
- <entry key="serial" >
|
|
|
- <bean class="org.apache.mybatis.jpa.id.SerialGenerator">
|
|
|
- <property name="ipAddressNodeValue" value="F0-76-1C-B0-26-9C=02,"/>
|
|
|
- </bean></entry>
|
|
|
- </map>
|
|
|
- </property>
|
|
|
- -->
|
|
|
- </bean>
|
|
|
-
|
|
|
- <!--
|
|
|
- <bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">
|
|
|
- <constructor-arg index="0" ref="sqlSessionFactory" />
|
|
|
- </bean>
|
|
|
- -->
|
|
|
-</beans>
|