英文:
Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
问题
如何修复这个问题?/我在使用Gradle/
描述:
无法将属性绑定到com.zaxxer.hikari.HikariDataSource:
属性:driverclassname
值:com.mysql.cj.jdbc.Driver
来源:属性源“source”的“driverClassName”
原因:无法在HikariConfig类加载器或线程上下文类加载器中加载驱动程序类com.mysql.cj.jdbc.Driver
操作:
更新您的应用程序配置
英文:
how fix this problem ? /I use Gradle/
Description:
Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:
Property: driverclassname
Value: com.mysql.cj.jdbc.Driver
Origin: "driverClassName" from property source "source"
Reason: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
Action:
Update your application's configuration
答案1
得分: 6
一天,我醒来后,打开了我的IntelliJ,启动了应用程序,但出现了相同的问题。
关于解决方法,请检查:
- 依赖项 'mysql:mysql-connector-java' 是否存在。
- 类 'com.mysql.cj.jdbc.Driver' 是否存在于全局搜索(ctrl+shift+n)的结果中 -> 类。
- 在IntelliJ中:选择 "文件" -> "Invalidate Caches / Restart"。
英文:
One day I woke up, ran my IntelliJ, started the app and had the same problem.
For a solution please check:
- Dependency 'mysql:mysql-connector-java' is exists.
- Class 'com.mysql.cj.jdbc.Driver' is exists through global search(ctrl+shift+n) -> classes.
- In IntelliJ: "File" -> "Invalidate Caches / Restart".
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论