Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The SAML MCM uses Spring Boot and Spring JPA for database configuration. Out of the box it ships with JDBC drivers for H2, MariaDB, Mysql, SQL Server and Postgres.

By default, it will use an With no custom database configuration the application will default to an embedded in-memory H2 database . To change which database is used, one should make changes to the applications.properties or application.yml file as appropriate. For further information, refer to the appropriate JDBC driver documentationwhich will be cleared out on application exit.


application.yml:


Code Block
titledatabase configuration
spring:
  profiles:
    include:
  datasource:
    platform: mysql
    driver-class-name: org.mariadb.jdbc.Driver
    url: jdbc:mariadb://db:3306/shibui
    username: shibui
    password: shibui
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MariaDB103Dialect
 
----------------------------------------------------------------
 
spring:
  profiles:
    include:
  datasource:
    platform: mysql
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://db:3306/shibui
    username: shibui
    password: shibui
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MySQL8Dialect
 
----------------------------------------------------------------
 
spring:
  profiles:
    include:
  datasource:
    platform: postgres
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://db:5432/shibui
    username: shibui
    password: shibui
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQL95Dialect
 
----------------------------------------------------------------
 
spring:
  profiles:
    include:
  datasource:
    platform: sqlserver
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://db:1433
    username: shibui
    password: shibui
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.SQLServerDialect


...