Yaml Configuration
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/yourDbName
username: root
password: root
driver-class-name: org.mariadb.jdbc.Driver
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
Important to notice
hibernate.dialect
must be setdriver-class-name
must be set- it needs to be the MySQL5InnoDBDialect or MySQL57InnoDBDialect instead of the MySQLInnoDBDialect
Dependencies in Maven
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>1.1.9</version>
</dependency>
<!-- if not already present -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
6 people found this article useful
6 people found this article useful