Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot multiple datasources

An example of Spring Boot, written in Kotlin, demonstrates how to use Hibernate with Kotlin as well as multiple datasources with the ability to create tables of the datasources and support for distributed transactions in multiple datasources.

To understand more about the project read the following tutorials,

How to run

First, start the databases (MySQL 8 and PostgreSQL 15) with docker-compose,

$ docker-compose up -d

Then run the project using mvnw,

$ ./mvnw spring-boot:run -Dserver.port=8090 

Lastly, open the browser and type http://localhost:8080/swagger-ui/index.html. You should see the Swagger interface to interact with the API.

Tips

To change the database configuration modify docker-compose.yml and if necessary application.properties.

About

Spring example written in Kotlin demonstrates how to use mutiple datasources with the ability of creating tables of the datasources

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages