国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Failed to determine a suitable driver class

這篇具有很好參考價(jià)值的文章主要介紹了Failed to determine a suitable driver class。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

剛新建的新項(xiàng)目,寫了pom文件后,遇到這個(gè)問(wèn)題。。。

failed to determine a suitable driver class,JAVA項(xiàng)目bug總結(jié),java

原因分析

導(dǎo)致這個(gè)問(wèn)題的原因是因?yàn)?,?pom.xml 配置文件中,配置了數(shù)據(jù)連接技術(shù) spring-boot-starter-jdbc 包 ,在啟動(dòng)配置文件時(shí) ,Spring Boot 的自動(dòng)裝配機(jī)制就會(huì)去配置文件中找,相關(guān)的數(shù)據(jù)庫(kù)的連接配置信息,如果找不到則拋出異常信息(具體源碼就不在這兒分析了,有興趣的可以自行去查看)

解決辦法

第一種解決辦法:

如果先暫時(shí)使用不到數(shù)據(jù)庫(kù)連接,只是測(cè)試搭建的項(xiàng)目是否能正常啟動(dòng),可以先將該配置項(xiàng)注釋掉即可,選中該項(xiàng)配置按快捷鍵 “ Ctrl + Shift + / ” 即可。

第二種解決辦法:

在 SpringBoot 應(yīng)用程序啟動(dòng)時(shí),排除 jdbc 的自動(dòng)裝配機(jī)制即可,在程序入口文件中新增配置注解 “ exclude=DataSourceAutoConfiguration.class ”
failed to determine a suitable driver class,JAVA項(xiàng)目bug總結(jié),java

第三種解決辦法:

在開(kāi)發(fā)庫(kù)或者本地庫(kù)中,如果有可用的臨時(shí)數(shù)據(jù)庫(kù),可以先配置該庫(kù)為暫時(shí)的數(shù)據(jù)庫(kù)即可,在 application.properties 配置文件中,加入配置內(nèi)容:

成功解決
failed to determine a suitable driver class,JAVA項(xiàng)目bug總結(jié),java文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-790755.html

到了這里,關(guān)于Failed to determine a suitable driver class的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Caused by: java.lang.IllegalStateException: Failed to introspect Class

    Caused by: java.lang.IllegalStateException: Failed to introspect Class

    1、問(wèn)題報(bào)錯(cuò)如下: 2、問(wèn)題解析: 意思是:未能反射rabbitmq類包(就是添加了依賴沒(méi)加載進(jìn)去);需與ClassNotFindException的錯(cuò)誤區(qū)分,此異常是引用了沒(méi)有依賴的類。 3、解決方案: 方案一(如果導(dǎo)入的依賴“scope”標(biāo)簽為值provided,則修改如下): 改為如下所示:(去掉scop

    2024年02月11日
    瀏覽(94)
  • Exception in thread “main“ java.sql.SQLException: No suitable driver

    Exception in thread “main“ java.sql.SQLException: No suitable driver

    詳細(xì)報(bào)錯(cuò)信息如下: Exception in thread \\\"main\\\" java.sql.SQLException: No suitable driver ?? ?at java.sql.DriverManager.getDriver(DriverManager.java:315) ?? ?at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.$anonfun$driverClass$2(JDBCOptions.scala:107) ?? ?at scala.Option.getOrElse(Option.scala:189) ?? ?at org.apache.spark.sq

    2024年02月07日
    瀏覽(27)
  • Java IDEA java.lang.IllegalStateException: Failed to introspect Class報(bào)錯(cuò)原因和解決辦法

    Java IDEA java.lang.IllegalStateException: Failed to introspect Class報(bào)錯(cuò)原因和解決辦法

    發(fā)現(xiàn)是因?yàn)?org.redisson:redisson.spring.boot.starter 3.10.6這個(gè)包引入不進(jìn)來(lái)導(dǎo)致的報(bào)錯(cuò) 嘗試了clean invalid caches and restart都沒(méi)法解決后 放大招,查看maven右側(cè)Dependencies每一個(gè)點(diǎn)進(jìn)去看是否有jar包沖突,發(fā)現(xiàn)有一個(gè)包里有一個(gè)redis的包, 懷疑jar包沖突,嘗試把這個(gè)包exclusion掉,可以成功運(yùn)

    2024年02月04日
    瀏覽(29)
  • SpringBoot微服務(wù)項(xiàng)目報(bào)錯(cuò):Failed to process import candidates for configuration class [springfox.boot...

    SpringBoot微服務(wù)項(xiàng)目報(bào)錯(cuò):Failed to process import candidates for configuration class [springfox.boot...

    [main] ERROR org.springframework.boot.SpringApplication - Application run failed org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [springfox.boot.starter.autoconfigure.OpenApiAutoConfiguration]; nested exception is java.io.FileNotFoundException: class path resource [springfox/document

    2024年01月17日
    瀏覽(27)
  • Caused by: java.lang.IllegalStateException: Failed to introspect Class [springfox.documentation.swag

    Caused by: java.lang.IllegalStateException: Failed to introspect Class [springfox.documentation.swag

    java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer ?? ?at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-2.2.12.RELEASE.jar:2.2.12.RELEAS

    2024年02月04日
    瀏覽(93)
  • Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: com.mysql.jdbc.Driver

    Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: com.mysql.jdbc.Driver

    記錄idea報(bào)錯(cuò), 1.引用外部庫(kù) mysql-connector-java-8.0.26 dependency ? ? ? groupIdmysql/groupId ? ? ??artifactIdmysql-connector-java/artifactId ? ? ? version8.0.26/version /dependency ? 2. 引入最新版的c3p0 dependency ? ? groupIdcom.mchange/groupId ? ? artifactIdc3p0/artifactId ? ? version0.9.5.5/version /dependency 3.連接的驅(qū)

    2024年02月02日
    瀏覽(21)
  • java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/DB3

    第一: 查看具體配置的路徑是否錯(cuò)誤,以及當(dāng)前的DB3數(shù)據(jù)庫(kù)是否存在。 如果地址填寫錯(cuò)誤(包括localhost或者端口3306寫出都會(huì))會(huì)報(bào): Exception in thread \\\"main\\\" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago

    2024年02月04日
    瀏覽(25)
  • RabbitMQ Failed to convert message.No method found for class java.lang.String問(wèn)題解決

    ????????org.springframework.amqp.rabbit.support.ListenerExecutionFailedException: Failed to convert message ????????Caused by: org.springframework.amqp.AmqpException: No method found for class java.lang.String 1、消息生產(chǎn)者發(fā)送的消息類型為String,消息消費(fèi)者接收的消息類型為Message,導(dǎo)致接收的時(shí)候類型轉(zhuǎn)換不

    2024年02月16日
    瀏覽(21)
  • 處理JDBC:java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/DB

    處理JDBC:java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/DB

    今天花費(fèi)一個(gè)多小時(shí)的事件處理這個(gè)問(wèn)題,最終的處理方法真的是太…棒了,我重開(kāi)了個(gè)項(xiàng)目,建了下模塊,結(jié)果問(wèn)題解決了。 本著斬草要除根……咳咳,刨根問(wèn)底的原則,我決定細(xì)查一下這個(gè)問(wèn)題,下面是我得到的結(jié)果! 不說(shuō)廢話,簡(jiǎn)單來(lái)說(shuō): ??官方定義了的一套操作

    2023年04月11日
    瀏覽(26)
  • 超詳細(xì)干貨解決Exception in thread “main“ java.lang.ClassNotFoundException及No suitable driver found for jdbc

    超詳細(xì)干貨解決Exception in thread “main“ java.lang.ClassNotFoundException及No suitable driver found for jdbc

    最近一直被eclipse的WindowBuilder和java繼jdbc連接Mysql的問(wèn)題困擾,終于摸索出對(duì)我有用的解決方法,希望這對(duì)你也有所幫助! 首先,當(dāng)你在eclipse等IDE編譯器里Run數(shù)據(jù)庫(kù)連接后,出現(xiàn)Exception in thread \\\"main\\\" java.lang.ClassNotFoundException的結(jié)果報(bào)錯(cuò),我本人后面出現(xiàn)的還有illegal一串字符,

    2024年02月06日
    瀏覽(94)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包