123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?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:mvc="http://www.springframework.org/schema/mvc" 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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
- http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"
- default-lazy-init="true">
-
-
- <context:property-placeholder location="classpath*:jdbc.properties" ignore-unresolvable="false"/>
-
- <bean id="ehcacheManager" class="org.springframework.cache.jcache.JCacheManagerFactoryBean">
- <property name="configLocation" value="classpath:ehcache-spring.xml" />
- </bean>
-
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="${jdbc.driverClassName}"/>
- <property name="url" value="${jdbc.url}"/>
- <property name="username" value="${jdbc.username}"/>
- <property name="password" value="${jdbc.password}"/>
- </bean>
-
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <property name="configLocation" value="classpath:mybatis-config.xml" />
- <property name="mapperLocations">
- <list>
- <value>classpath*:/com/sundata/**/mybatis/*.xml</value>
- </list>
- </property>
- </bean>
- <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
- <constructor-arg index="0" ref="sqlSessionFactory" />
- </bean>
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.sundata.**.mapper" />
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
- </bean>
-
-
- <bean id="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource" />
- </bean>
-
-
- <tx:annotation-driven proxy-target-class="true"/>
- <context:annotation-config />
- <aop:aspectj-autoproxy />
- <context:component-scan base-package="com.sundata" >
- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
- </context:component-scan>
-
- <cache:annotation-driven mode="proxy" cache-manager="cacheManager"/>
-
- <bean id="cacheManager" class="org.springframework.cache.jcache.JCacheCacheManager">
- <property name="cacheManager" ref="jCacheManagerFactory"/>
- </bean>
-
-
- <bean id="jCacheManagerFactory"
- class="org.springframework.cache.jcache.JCacheManagerFactoryBean">
-
- <property name="cacheManagerUri" value="classpath:ehcache-batch.xml" />
- </bean>
- </beans>
|