<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
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-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
<!-- ###========================= JavaMailConfig ======================== -->
<!-- <context:property-placeholder location="/WEB-INF/classes/jdbc.properties,/WEB-INF/classes/mail.properties" />-->
<context:property-placeholder location="classpath:jdbc.properties,classpath:mail.properties" />
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${mail.host}" />
<property name="port" value="${mail.port}" />
<property name="username" value="${mail.username}" />
<property name="password" value="${mail.password}" />
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
</props>
</property>
</bean>
<bean id="SendMailUtil" class="co.jp.neusoft.billing.fw.util.SendMailUtil">
<property name="mailSender" ref="mailSender" />
<property name="sendUser" value="${mail.from}" />
</bean>
<!-- ###========================= DataSource ======================== -->
<bean id="dataSource" class="co.jp.neusoft.billing.fw.jdbc.dbcp.BillingDataSource"
destroy-method="close" init-method="initBillingDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<property name="initialSize" value="${jdbc.initialSize}" />
<property name="maxActive" value="${jdbc.maxActive}" />
<property name="testOnBorrow" value="true" />
<property name="validationQuery" value="SELECT 1" />
<property name="validationQueryTimeout" value="3" />
<property name="testWhileIdle" value="true" />
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<property name="numTestsPerEvictionRun" value="3" />
<property name="maxIdle" value="10" />
<property name="minIdle" value="3" />
<!-- <property name="maxWait" value="${jdbc.maxWait}" />-->
</bean>
<!-- ###========================= MaxValueIncrementer ======================== -->
<bean lazy-init="true" id="maxValueIncrementer" abstract="true"
class="org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer">
<property name="dataSource">
<ref local="dataSource"/>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource">
<ref local="dataSource"/>
</property>
</bean>
<!-- ###========================= TransactionManager ======================== -->
<!-- ===@since 2.0 Start=== -->
<!-- Enable @Transactional support -->
<tx:annotation-driven />
<aop:config>
<aop:pointcut id="serviceOperation" expression="execution(* co.jp.neusoft.billing..services.*Service.*(..))"/>
<aop:advisor pointcut-ref="serviceOperation" advice-ref="txAdvice"/>
</aop:config>
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="find*" read-only="true"/>
<tx:method name="select*" read-only="true"/>
<tx:method name="*" propagation="REQUIRED" rollback-for="Exception" />
</tx:attributes>
</tx:advice>
<!-- Enable @AspectJ support -->
<!-- <aop:aspectj-autoproxy />-->
<!-- ===@since 2.0 End=== -->
<bean id="actionLogAroundAdvisor" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="interceptorNames">
<list>
<value>actionLogAroundAdvice</value>
</list>
</property>
<property name="beanNames">
<list>
<value>/*</value>
</list>
</property>
</bean>
<bean id="actionLogAroundAdvice" class="co.jp.neusoft.billing.fw.aop.ActionLogAroundAdvice"/>
<aop:config>
<aop:aspect ref="serviceLogAroundAdvice">
<aop:around pointcut="execution(* co.jp.neusoft.billing.app..services.*Service.*(..))" method="invoke"/>
</aop:aspect>
</aop:config>
<bean id="serviceLogAroundAdvice" class="co.jp.neusoft.billing.fw.aop.ServiceLogAroundAdvice"/>
<!-- ###========================= SQL Map DAO ======================== -->
<bean id="sqlMapDao.rakuten" abstract="true"
class="org.springframework.orm.ibatis.support.SqlMapClientDaoSupport">
<property name="sqlMapClient">
<ref local="sqlMapClient"/>
</property>
</bean>
<bean id="sqlMapClient"
class="co.jp.neusoft.billing.fw.dao.IBatisSqlMapClientFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="sqlMapLocations"
value="classpath*:co/jp/neusoft/billing/**/dao/*-sql-map.xml"/>
<property name="statementCachingEnabled" value="true"/>
<property name="cacheModelsEnabled" value="true"/>
<property name="useStatementNamespaces" value="true"/>
</bean>
<bean id="BillingFrameworkStaticServiceBean"
class="co.jp.neusoft.billing.fw.services.BillingStaticServiceBean" />
<bean id="BasePagerService"
class="co.jp.neusoft.billing.fw.services.BasePagerService" />
<bean id="BillingDateUtil" class="co.jp.neusoft.billing.fw.util.DateUtil">
<property name="dateDao" ref="BillingBaseDao" />
</bean>
<bean id="BillingBaseDao" class="co.jp.neusoft.billing.fw.dao.AbstractDao" parent="sqlMapDao.rakuten" scope="prototype" />
<!-- 設定ファイルのインポート(仮) -->
<import resource="classpath*:co/jp/neusoft/billing/**/conf/*-context.xml"/>
<bean id="propertiesConfiguration"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="singleton" value="true" />
<property name="fileEncoding" value="utf8" />
<property name="ignoreResourceNotFound" value="true" />
<property name="locations">
<list>
<value>classpath:config.properties</value>
</list>
</property>
</bean>
<!-- XMemcached Client Config -->
<bean name="memcachedClientBuilder" class="net.rubyeye.xmemcached.XMemcachedClientBuilder">
<constructor-arg>
<list>
<bean class="java.net.InetSocketAddress">
<constructor-arg value="${billing.memcached.server.hostip}" />
<constructor-arg value="${billing.memcached.server.port}" />
</bean>
</list>
</constructor-arg>
<property name="connectionPoolSize" value="5" />
<property name="commandFactory">
<bean class="net.rubyeye.xmemcached.command.BinaryCommandFactory" />
</property>
<property name="sessionLocator">
<bean class="net.rubyeye.xmemcached.impl.KetamaMemcachedSessionLocator" />
</property>
<property name="transcoder">
<bean class="net.rubyeye.xmemcached.transcoders.SerializingTranscoder" />
</property>
</bean>
<bean name="memcachedClient" factory-bean="memcachedClientBuilder" factory-method="build" destroy-method="shutdown" />
</beans>
分享到:
相关推荐
spring xml配置的12個技巧 spring xml配置的12個技巧 spring xml配置的12個技巧
Spring XML配置的12个技巧.doc
这是关于eclipse如何设置springXML文件的提示,网上收集了哈!
自己总结的spring xml配置的思维导图,包括了spring的基础配置
在这篇文章里对于SpringXML配置我将向你展示12种比较好实战其中些实战不仅是好实战更是必要实战除 此以外还有其他原因例如领域模型设计都能影响XML配置但是这篇文章重点研究XML配置易读性和易管理性
通过配置文件来实现定时任务
spring在英文里有春天、弹簧、跳跃和泉眼的意思。Spring 也表示是一个开源框架,是为了解决企业应用程序开发复杂性由Rod Johnson创建的。框架的主要优势之一就是其分层架构,分层架构允许您选择使用哪一个组件,同时...
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd ...
NULL 博文链接:https://huihai.iteye.com/blog/856112
Spring xml 配置案例 经典的Spring的xml配置,Spring事务的配置
Spring XML 的配置实例
spring xml 实现aop切面编程 内附注释,希望对入门的新手有帮助
Spring XML配置十二个最佳实践
底层使用poi,以spring xml的风格配置,完成excel的导入导出功能,强大简单,可以使用Map类型接受数据
Spring通过xml实现IOC,Spring通过xml实现IOC,Spring通过xml实现IOC
spring 配置文件中 bean 的class 属性 alt+/ 自动提示类的全路径(插件+教程)1分钟部署
演示了spring对aop的支持,包括注解方式、基于xml方式。
spring mvc生成xml或json