Spring Boot error with time zone

Asked

Viewed 398 times

-1

Hello, when I run the program spring gives this error: java.sql.Sqlexception: No Timezone Mapping entry for 'Timezone'. My question is how I put useTimezone=true&serverTimezone=UTC in my application.properties configuration for createDatabaseIfNotExist=true. My configuration is: spring.datasource.url= jdbc:mysql://localhost:3306/demo_mvc? createDatabaseIfNotExist=true spring.datasource.username= root spring.datasource.password= root

JPA

spring.jpa.Hibernate.ddl-auto= update spring.jpa.show-sql= true spring.jpa.open-in-view= true spring.jpa.Hibernate.use-new-id-Generator-mappings = false

THYMELEAF

spring.thymeleaf.cache = false

1 answer

0

I managed to solve it this way:

spring.datasource.url= jdbc:mysql://localhost:3306/demo_mvc? useTimezone=true&serverTimezone=Utc&createdatabaseifnotexist=true spring.datasource.username= root spring.datasource.password= root

Browser other questions tagged

You are not signed in. Login or sign up in order to post.