Skip to content

yookue/mybatis-delegator-spring-boot-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mybatis Delegator Spring Boot Starter

Spring Boot application integrates mybatis quickly, to support several mybatis bean instances, typically with multiple DataSource.

Quickstart

  • Import dependencies
    <dependency>
        <groupId>com.yookue.springstarter</groupId>
        <artifactId>mybatis-delegator-spring-boot-starter</artifactId>
        <version>LATEST</version>
    </dependency>

By default, this starter will auto take effect, you can turn it off by spring.mybatis-delegator.enabled = false

  • Configure your beans with a MybatisConfigurationDelegator bean by constructor or @Autowired/@Resource annotation, then you can create beans with it as following:
Method Return Method Name
SqlSessionFactory sqlSessionFactory
SqlSessionTemplate sqlSessionTemplate

Document

Requirement

  • jdk 17+

License

This project is under the Apache License 2.0

See the NOTICE.txt file for required notices and attributions.

Donation

You like this package? Then donate to us to support the development.

Copyright

Beijing Yookue Network Technology Ltd.

Website

Releases

No releases published

Packages

No packages published

Languages