Skip to content

loochao/mybatis-with-complex-source

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mybatis-with-complex-source

Using mybatis in SpringBoot with complex data source .

how to use

add test table in two database

  • first of all , we need to design our ER map in two databse :

    we use mysql workbench to finish the job :

    add two scheme , named test1 and test2

    1.jpg

    2.jpg

    in test1 , we have user and shipping_address table

    in test2 , we have order table

  • now , we need to export our table sql :

    also use mysql workbench to finish that :

    3.jpg

    4.jpg

  • finaly , create the test database in mysql :

    simply finish the job by running the table.sql :

    5.jpg

generate mybatis domain and mappers file

because we have two database to connect

so there are two mybatis-generator config file named generatorTest1.xml and generatorTest2.xml in complex-service resources .

for more detail , plz enter complex-service folder .

About

Using mybatis in SpringBoot with complex data source .

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 71.2%
  • JavaScript 19.7%
  • Vue 8.8%
  • HTML 0.3%