测试service时报错
来源:5-9 商户投放子系统 - 创建商户服务接口实现

qq_大橙威_bejpHM
2019-11-04
求助老师,代码不会有错,是哪里配置出问题了吗
Caused by: 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]
写回答
1回答
-
同学你好:
从这里的部分异常可以看出是 MySQL 相关的地方报错,可能错误的原因是:
1. MySQL 相关的配置错误,密码、用户名、驱动、时区之类的
2. 代码定义错误,大概率是实体类定义的与数据库表不一致
如果还不能解决,可以加下 QQ 群,在群里详细的说明问题,以便定位解决。
欢迎来 QQ 群随时交流、讨论,也非常感谢同学的支持!
112020-03-16
相似问题