如果dubbo使用注解,并且spring也使用注解,如使用事务,则dubbo加过注解的类无法发布。

<?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:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
"> <!-- 配置数据源 -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:ORCL" />
<property name="username" value="test1" />
<property name="password" value="123456" />
<property name="filters" value="wall" />
<property name="initialSize" value="2" />
<property name="minIdle" value="2" />
<property name="maxActive" value="200" />
<property name="maxWait" value="60000" />
<property name="minEvictableIdleTimeMillis" value="300000" />
<property name="validationQuery" value="select 1 from dual" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<property name="poolPreparedStatements" value="true" />
<property name="maxOpenPreparedStatements" value="100" />
</bean> <!-- 配置hibernate SessionFactory -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hiberante.format_sql">true</prop>
<prop key="hibernate.autoReconnect">true</prop>
</props>
</property> <!-- 扫描hibernate的注解 -->
<property name="packagesToScan" value="com.br.model" />
</bean> <!-- 事务管理器 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean> <!--启动注解用注解来管理事务 -->
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>

最新文章

  1. Tomcat中JVM内存溢出及合理配置及maxThreads如何配置(转)
  2. 22中编程语言的HelloWorld
  3. ThinkPHP 3.2.3 简单后台模块开发(一)常用配置
  4. Windows下Faster-RCNN的使用
  5. iOS改变NavigationBar的返回键和标题颜色、大小
  6. Swift学习--常量.变量.数据类型的使用(一)
  7. C语言 指针与字符串
  8. NodeJS异常处理uncaughtException篇
  9. codevs 4919 线段树练习4
  10. 字符串string
  11. uva 12549 最大流
  12. 使用ckplayer搭建rtmp视频直播应用
  13. Linux Kernel ‘mp_get_count()’函数本地信息泄露漏洞
  14. today reading notes
  15. N 组连续子串最大和
  16. 深入理解linux网络技术-P179
  17. 《AutoCAD Civil 3D .NET二次开发》勘误2
  18. 阿里云ECS相关
  19. Beta冲刺 4
  20. TCP/IP 笔记 - 地址解析协议

热门文章

  1. TCP/IP与套接字
  2. 用C#截取指定长度的中英文混合字符串
  3. Servlet对象生命周期(四)
  4. Jmeter-无法启动,&#39;findstr&#39;不是内部或外部命令,也不是可运行的程序
  5. ThreadLocalRandom原理
  6. SSKeychain的使用 钥匙串
  7. AngularJs ng-repeat解决循环对象出现重复项报错的问题
  8. [PowerShell]template engine
  9. Django 09 博客小案例
  10. PAT - 1067 试密码 (20 分)