【发布时间】:2015-03-19 11:06:00
【问题描述】:
您好,我还是 spring 的新手并休眠,这是我第一个尝试连接到 db 的应用程序,但我得到了这个异常 HTTP 状态 500 - 请求处理失败;嵌套异常是 org.hibernate.exception.GenericJDBCException:无法打开连接 并在控制台中:org.hibernate.exception.GenericJDBCException:无法打开连接],根本原因是 java.sql.SQLException: 用户'root'@'localhost'的访问被拒绝(使用密码:YES) 任何人都可以帮助我请我检查与其他 Java 应用程序的连接,它运行良好!
数据库.properties
database.driver=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost:3306/DAVDB
database.user=root
database.password=''
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hibernate.hbm2ddl.auto=update
【问题讨论】: