Coder Social home page Coder Social logo

spring-jta-mybatis's Introduction

igool

个人技术博客

spring-jta-mybatis's People

Contributors

igool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-jta-mybatis's Issues

我现在使用javaconfig,用mapperscanner扫描的时候,虽然指定了sqlSessionTemplateRef,但是只是拿默认的sqlseesion扫描,其他sqlsession是用不了的。

具体错误
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.order.mybatis.mappers.OrderMapper.findOrderByIdAndUserId
at org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:196)
at org.apache.ibatis.binding.MapperMethod.(MapperMethod.java:44)

如果路由到默认的sqlsession是可以的。。

Hi,这个方案能对AbstractRoutingDataSource做兼容吗?

我现在的场景是有2个大库,每个大库又有4个小库,比如有shop_0,shop_1,shop_2,shop_3库,我通过spring的AbstractRoutingDataSource来实现通过userid路由到具体的shop库。如果通过你的方法,我需要定义8个sqlsessiontemplate,目前的这个策略可以兼容AbstractRoutingDataSource吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.