使用spring boot 写了一个简单的后端程序程序部分没有显示error但在运行的时候出现如下错误
2023-02-07 13:29:33.274 INFO 11108 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1220 ms
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
2023-02-07 13:29:33.402 INFO 11108 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2023-02-07 13:29:33.451 INFO 11108 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.14.Final
2023-02-07 13:29:33.640 INFO 11108 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2023-02-07 13:29:33.733 INFO 11108 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2023-02-07 13:29:33.735 WARN 11108 --- [ restartedMain] com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2023-02-07 13:29:35.350 ERROR 11108 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
以及
2023-02-07 13:29:35.352 ERROR 11108 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
2023-02-07 13:29:35.354 WARN 11108 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
2023-02-07 13:29:35.358 INFO 11108 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2023-02-07 13:29:35.369 INFO 11108 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-02-07 13:29:35.392 ERROR 11108 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
我这里好像上传不了图片,两张截图在下面链接:
https://imgloc.com/i/rM12P
https://imgloc.com/i/rMTuC