![JPA Could not load requested class;Unable to resolve name [x] as strategy[x]问题解决](/uploads/image/0282.jpg)
JPA Could not load requested class;Unable to resolve name [x] as strategy[x]问题解决
问题描述:
Caused by: java.lang.classNotFoundException: Could not load requested class : mysql Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [mysql] Caused by: org.hibernate.boot.registry.selector.spi.strategySelectionException: Unable to resolve name [mysql] as strategy [org.hibernate.dialect.Dialect]
问题分析:1、Spring Boot配置里面没有设置数据库类型,导致报错。
解决办法:
(1)使用spring.datasource.platform设置数据库类型。
spring.datasource.platform = mysql(2)使用spring.JPA.database设置数据库类型。
spring.jpa.database = mysql👁️ 阅读量:0
© 版权声明:本文《JPA Could not load requested class;Unable to resolve name [x] as strategy[x]问题解决》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686592591a301141.html。