Factory method ‘jdbcDialect‘ threw exception; nested exception is org.springframework.data.jdbc.repo

我在使用spring-boot-starter-jdbc的时候,配置数据源之后出现问题,它提示我要为数据源提供一个Dialect对象。

因为我使用的是国产达梦数据库,spring不提供相应的Dialect,我也懒得写,解决方法很简单,将 spring-boot-starter-jdbc 替换成 tomcat-jdbc
我的数据源配置如下:

tomcat-jdbc依赖:

Application.yaml

成功解决:

不过到后来我才发现,它有报一个密码错误,原来是我的密码写错了,需要给密码加上双引号才可以正常运行,不过我见别人没加就能运行,原谅我这个小白也没搞明白

后来又改了pom.xml文件

 application.yaml:密码加上了双引号号

测试运行成功:

参考博客:https://blog.csdn.net/qq_35767005/article/details/109842965

原文地址:https://www.cnblogs.com/LEPENGYANG/p/15585174.html