zoukankan      html  css  js  c++  java
  • springMVC + mybatis 下出现JDBC Connection *** will not be managed by Spring错误

    仔细查看配置中是否有如下类似的配置 execution(* com.ciguo.service.*.*(..))

    <aop:config>
    <aop:pointcut id="operation" expression="execution(* com.sword.dataprocess.service.*.*(..))" />
    <aop:advisor advice-ref="txAdvice" pointcut-ref="operation" />
    <aop:advisor advice-ref="txAdvice"
    pointcut="execution(* com.sword.dataprocess.service*.*.*(..))" />
    </aop:config>

    这种写法是扫描到service下一级*.java里面的方法,显然是找不到的,于是乎改成 execution(* com.ciguo.service.impl.*.*(..))

    <aop:config>
    <aop:pointcut id="operation" expression="execution(* com.sword.dataprocess.service.impl.*.*(..))" />
    <aop:advisor advice-ref="txAdvice" pointcut-ref="operation" />
    <aop:advisor advice-ref="txAdvice"
    pointcut="execution(* com.sword.dataprocess.service.impl*.*.*(..))" />
    </aop:config>

    SqlSession现在已经被spring管理了,事务也生效了

  • 相关阅读:
    软件工程概论课后作业2
    第三周进度表
    软件工程概论课后作业1
    第二周进度表
    9.异常处理
    《构建之法》阅读笔记二
    《构建之法》阅读笔记一
    第五周进度表
    软件工程个人作业03
    第四周进度表
  • 原文地址:https://www.cnblogs.com/zhangliang88/p/11692845.html
Copyright © 2011-2022 走看看