运行单元测试注入dao类报错
来源:4-1 买家类目-dao(上)
南柯一梦21
2020-06-11
运行项目3-1代码,在单元测试类内注入dao类,就报一下错误:
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: 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]
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
项目结构和yml配置
请问老师这个怎么解决?
1回答
-
廖师兄助理
2020-06-12
你一步一步来,先空的springboot启动不报错以后,在慢慢添加相关依赖,跟着视频里面走,git里面有相关源码,你直接都加上,哪里地方少了东西看不出来的
022020-06-12
相似问题