spring jpa application.properties useSSL spring jpa application.properties useSSL mysql mysql

spring jpa application.properties useSSL


I fixed my issue with the below:

jdbc:mysql://localhost:3306/test?verifyServerCertificate=false&useSSL=false&requireSSL=false


Shouldn't you be using '?' instead of '&'

This is yours

spring.datasource.url =jdbc:mysql://localhost:3306/test&useSSL=false

What I'm saying is

spring.datasource.url = jdbc:mysql://localhost:3306/test?useSSL=false


I don't like to pollute java options or system properties, which are useless in application containers in any case...

You can set SSL certificate for MySQL connection programmically with:

jdbc:mysql://example.com:3306/MYDB?verifyServerCertificate=true&useSSL=true&requireSSL=true&clientCertificateKeyStoreUrl=file:cert/keystore.jks&clientCertificateKeyStorePassword=123456&trustCertificateKeyStoreUrl=file:cert/truststore.jks&trustCertificateKeyStorePassword=123456

It is documented: