Code Monkey home page Code Monkey logo

kasramp / spring-multiple-datasources Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 56 KB

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

Home Page: https://www.geekyhacker.com/spring-boot-connect-to-multiple-datasources/

License: GNU General Public License v3.0

Kotlin 100.00%
spring-boot jpa jpa-hibernate hibernate-multitenant kotlin kotlin-spring-boot spring-boot-3 springboot3

spring-multiple-datasources's Introduction

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.

spring-multiple-datasources's People

Contributors

kasramp avatar

Watchers

 avatar  avatar

spring-multiple-datasources's Issues

Upgrade the project to Spring Boot 3

Upgrade the project to Spring Boot 3 and every other dependencies. Additionally, move to Kotlin 1.8.21 and JDK 17. Drop Springfox Swagger in favor of OpenAPI Swagger, ... Finally, add CI pipeline to the project.

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.