By default, Griffin uses EclipseLink as the default JPA implementation. This document provides ways to switch mysql and postgresql.
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency>
configure application.properties
spring.datasource.url = jdbc:mysql://localhost:3306/quartz?autoReconnect=true&useSSL=false spring.datasource.username = griffin spring.datasource.password = 123456 spring.jpa.generate-ddl=true spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.jpa.show-sql = true
If you use hibernate as your jpa implentation, you need also to add following configuration.
spring.jpa.hibernate.ddl-auto = update spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
configure quartz.properties
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
<dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> </dependency>
configure application.properties
spring.datasource.url = jdbc:postgresql://localhost:5432/quartz?autoReconnect=true&useSSL=false spring.datasource.username = griffin spring.datasource.password = 123456 spring.jpa.generate-ddl=true spring.datasource.driver-class-name = org.postgresql.Driver spring.jpa.show-sql = true
If you use hibernate as your jpa implentation, you need also to add following configuration.
spring.jpa.hibernate.ddl-auto = update spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
configure quartz.properties
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate