keytool -genkey -alias client -keyalg RSA -keystore client.jks -keysize 2048
keytool -export -alias client -file client.crt -keystore client.jks
keytool -import -v -trustcacerts -alias client -file client.crt -keystore clienttrust.jks
# Datasource configuration for jdbc h2 | |
# this is for file based persistent storage | |
# spring.datasource.url=jdbc:h2:file:/data/demo | |
# For in-memory storage | |
spring.datasource.url=jdbc:h2:mem:testdb;MODE=MySQL;DB_CLOSE_DELAY=-1;IGNORECASE=TRUE; | |
spring.datasource.driverClassName=org.h2.Driver | |
spring.datasource.username=vslala | |
spring.datasource.password=simplepass | |
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect |
keytool -genkey -alias client -keyalg RSA -keystore client.jks -keysize 2048
keytool -export -alias client -file client.crt -keystore client.jks
keytool -import -v -trustcacerts -alias client -file client.crt -keystore clienttrust.jks
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).