为了账号安全,请及时绑定邮箱和手机立即绑定

自动创建表,出现的错误,有谁知道这个问题怎么解决吗?

自动创建表,出现的错误,有谁知道这个问题怎么解决吗?

qq_旧人_6 2017-11-23 17:13:08
问题java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) at com.lw.girl.GirlApplication.main(GirlApplication.java:10) [classes/:na]2017-11-23 16:55:41.819  WARN 8528 --- [           main] o.h.e.j.e.i.JdbcEnvironmentInitiator     : HHH000342: Could not obtain connection to query metadata : Access denied for user 'root'@'localhost' (using password: YES)2017-11-23 16:55:41.821  WARN 8528 --- [           main] ationConfigEmbeddedWebApplicationContext : 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/HibernateJpaAutoConfiguration.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]2017-11-23 16:55:41.824  INFO 8528 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]2017-11-23 16:55:41.853  INFO 8528 --- [           main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2017-11-23 16:55:41.868 ERROR 8528 --- [           main] o.s.boot.SpringApplication               : Application startup failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.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] at com.lw.girl.GirlApplication.main(GirlApplication.java:10) [classes/:na]Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set ... 32 common frames omittedProcess finished with exit code 1环境spring:  profiles:    active: dev  datasource:    driver-class-name: com.mysql.jdbc.Driver    url: jdbc:mysql://localhost:3306/dbgirl    username: root    password: 123456  jpa:    hibernate:      ddl-auto: create    show-sql: true
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 1305 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信