简体   繁体   English

Caused by: java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl

[英]Caused by: java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl

Unable to figure out what is causing the issue.无法弄清楚导致问题的原因。

My application.properties file我的 application.properties 文件

    spring.datasource.url = "jdbc:mysql://localhost:3306/Medical_Tracking?useSSL=false"
    spring.datasource.username=root
    spring.datasource.password=root
    spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
    spring.jpa.show-sql=true
    spring.jpa.hibernate.ddl-auto=update
    spring.jpa.generate-ddl=true

Quick help is appreciated快速帮助表示赞赏

your config spring.datasource.url should not use "", use spring.datasource.url = jdbc:mysql://localhost:3306/Medical_Tracking?useSSL=false instead your config spring.datasource.url should not use "", use spring.datasource.url = jdbc:mysql://localhost:3306/Medical_Tracking?useSSL=false instead

Try following change in applications.properties file:尝试在 applications.properties 文件中进行以下更改:

Replace代替

 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

with

spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我的 application.properties 中的属性显示为灰色。 构建成功但驱动程序 com.mysql.cj.jdbc.Driver 声称不接受 jdbcUrl - Properties in my application.properties are grayed out. Build success but Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl Uncaught exception from servlet java.lang.RuntimeException: Driver org.hsqldb.jdbc.JDBCDriver claims to not accept jdbcUrl, jdbc:mysql:///iworks_db - Uncaught exception from servlet java.lang.RuntimeException: Driver org.hsqldb.jdbc.JDBCDriver claims to not accept jdbcUrl, jdbc:mysql:///iworks_db 如何为Liferay查找'java.lang.ClassNotFoundException:com.mysql.cj.jdbc.Driver' - How to fiw 'java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver' for liferay 在应用程序中,我具有对JDBC驱动程序的访问权限(java.lang.ClassNotFoundException除外:com.mysql.cj.jdbc.Driver) - In application I have acsess to JDBC driver (exception java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver) com.intellij.execution.ExecutionException:线程“main”中的异常 java.lang.ClassNotFoundException:com.mysql.cj.jdbc.Driver - com.intellij.execution.ExecutionException: Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver java netbeans新的驱动程序类是`com.mysql.cj.jdbc.Driver'。 - java netbeans The new driver class is `com.mysql.cj.jdbc.Driver' 独立的 jpackage 生成 java 应用程序为 com.mysql.cj.Z84BZFFD.5A0D4966AD1C50DA4BEC50Z.mysql.cj.Z84BZFFD.5A0D4967C7ACEr708Driver7A7086 - Stand alone jpackage generated java app generates ClassNotFoundException for com.mysql.cj.jdbc.Driver Liquibase Windows MySQL - Cannot find database driver: com.mysql.cj.jdbc.Driver - Liquibase Windows MySQL - Cannot find database driver: com.mysql.cj.jdbc.Driver 当mysql-connector-java-8.0.16.jar位于类路径中时,为什么会出现java.lang.ClassNotFoundException:com.mysql.cj.jdbc.Driver? - Why do I get java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver when mysql-connector-java-8.0.16.jar is in the classpath? 配置错误。 找不到 Class [com.mysql.cj.jdbc.Driver]。 EclipseLink, MySQL 驱动程序 - Configuration error. Class [com.mysql.cj.jdbc.Driver] not found. EclipseLink, MySQL driver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM