Skip to content

Provide automatic configuration of multiple jpa for Springboot

License

Notifications You must be signed in to change notification settings

zivasd/spring-boot-multi-jpa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-multi-jpa

Provide automatic configuration of multiple jpa for Spring boot

Getting Started

Reference Documentation

Guides

SpringBoot Configuration Sample

spring:
  application:
    name: sample
  jpas:
    # EntityManager bean name as primaryEntityManager, similar to EntityManagerFactoryBuild, EntityManagerFactory and TransactionManager.
    primary:
      # search bean named primary first, search bean named primaryDataSource if not found.
      data-source: primary
      base-packages:
        - com.example.entity
      repositories:
        base-packages:
          - com.example.repo.primary
      generate-ddl: false
      show-sql: true
      open-in-view: true
      database-platform: org.hibernate.dialect.DmDialect
      hibernate:
        ddl-auto: none
    secondary:
      data-source: secondary
      base-packages:
        - com.example.entity2
      repositories:
        base-packages:
          - com.example.repo.secondary
      show-sql: true
      hibernate:
        ddl-auto: none
      open-in-view: true
      database-platform: org.hibernate.dialect.DmDialect    

About

Provide automatic configuration of multiple jpa for Springboot

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages