我该如何解决这个 pom.xml 问题? (连接到数据库)

How can I fix this pom.xml problem? (coonection to the database)

我正在使用:MySQL Workbench 8.0,Spring Tool Suite 3.9.7 和 JDK 11。(这是我所有的)

我想创建数据库连接,但我得到这个错误:

java.sql.SQLException: The server time zone value 'Közép-európai téli idõ' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

完整的错误在这里:https://hastebin.com/zimibuvafa.sql

应用程序属性

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/test1
spring.datasource.username=root
spring.datasource.password=adam
spring.mvc.view.prefix: /jsp/
spring.mvc.view.suffix: .jsp
spring.jpa.show-sql=true

密码、用户名、测试名称正确。

pom.xml: https://hastebin.com/oyufeporit.xml

最后,我用实体 class 创建了一个正确的实体包。 (因为os连接)--> @Entity、Getters-Setters等

谢谢你所做的一切。

亚当

替换你的行

spring.datasource.url=jdbc:mysql://localhost:3306/test1

jdbc:mysql://localhost:3030/db?test1=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

并添加另一行 spring.datasource.driverClassName=com.mysql.jdbc.Driver