环境:Spring Boot 2.1.3
在pom.xml中添加依赖
1
2
3
4
5
org.mariadb.jdbc
mariadb-java-client
2.4.2
JDBC连接
1
2
3
spring.datasource.url=jdbc:mariadb://127.0.0.1:3306/yourdb?&useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=db-username
spring.datasource.password=db-password