Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

This is an example implementation for Spring MultiDB solution

Notifications You must be signed in to change notification settings

TeamWanari/Spring-Multi-SQL-DB-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring MultiDB example

This is an example implementation for Spring MultiDB solution

Installation

There is a Maven wrapper pushed to the repository so you can run the project with that file (mvnw or mvnw.cmd). All you need is to set up two local (Postgre) databases described in the application.yml file

spring:
  datasource:
    view:
      type: com.zaxxer.hikari.HikariDataSource
      url: jdbc:postgresql://stanlin.wanari.com:5432/spring-multidb-view
      username: spring-multidb-view
      password: spring-multidb-view
    prod:
      type: com.zaxxer.hikari.HikariDataSource
      url: jdbc:postgresql://stanlin.wanari.com:5432/spring-multidb-prod
      username: spring-multidb-prod
      password: spring-multidb-prod

Liquibase will insert the initial data for you when the application starts.

You can try it out for example with Postman by calling the API

About

This is an example implementation for Spring MultiDB solution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published