Sunday, December 28, 2014

How to use MariaDB in Spring Boot

To use MariaDB in Spring Boot,

you can set the following datasource properties in application.properties:

spring.datasource.url=jdbc:mariadb://localhost:3306/db_wic
spring.datasource.username=wic
spring.datasource.password=1234
spring.datasource.driverclassName=org.mariadb.jdbc.Driver

and add the following JDBC dependency in build.gradle:

compile("org.mariadb.jdbc:mariadb-java-client:1.1.7")

Reference:
https://mariadb.com/kb/en/mariadb/client-libraries/mariadb-java-client/about-the-mariadb-java-client/

2 comments: