suchorski / springboot-keycloak-server

Embeded Keycloak on Spring Boot Server
Apache License 2.0
26 stars 12 forks source link

when i change database from h2 to mysql getting issue #12

Closed ChiragsinhCW closed 1 month ago

ChiragsinhCW commented 1 month ago

Properties file changes spring.jpa.defer-datasource-initialization=true spring.jpa.properties.hibernate.transaction.jta.platform=org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform spring.jpa.properties.hibernate.ddl-auto=update

spring.datasource.url=jdbc:mysql://localhost:3306/keycloak?useSSL=false&serverTimezone=UTC

spring.datasource.url=jdbc:mysql://localhost:3306/keycloak?useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.jpa.properties.hibernate.transaction.jta.platform=com.atomikos.icatch.jta.hibernate4.AtomikosPlatform

keycloak.server.context-path=/auth keycloak.server.username=admin keycloak.server.password=admin keycloak.server.context-redirect=true

logging.level.root=ERROR

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

pom.xml changes

mysql mysql-connector-java 8.0.28
suchorski commented 1 month ago

Did you change on keycloak-server.json too?

ChiragsinhCW commented 1 month ago

i am not able find this file in your project can you please share file location. if possible can you make this keycloak server with mysql

suchorski commented 1 month ago

i am not able find this file in your project can you please share file location.

if possible can you make this keycloak server with mysql

src/main/resources/META-INF/keycloak-server.json

On connectionsJpa, line 96

ChiragsinhCW commented 1 month ago

i appreciate your support thank you