第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

spring boot 數(shù)據(jù)庫(kù)錯(cuò)誤數(shù)據(jù)源

spring boot 數(shù)據(jù)庫(kù)錯(cuò)誤數(shù)據(jù)源

慕田峪9158850 2021-11-24 15:41:49
我正在使用 spring boot、hibernate 和我的 sql,但出現(xiàn)錯(cuò)誤。org.springframework.beans.factory.UnsatisfiedDependencyException:創(chuàng)建名為“org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration”的bean時(shí)出錯(cuò):通過(guò)構(gòu)造函數(shù)參數(shù)0表示的不滿足的依賴;嵌套異常是 org.springframework.beans.factory.BeanCreationException:在類路徑資源 [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class] 中定義名稱為“dataSource”的 bean 創(chuàng)建錯(cuò)誤:通過(guò)工廠方法的 Bean 實(shí)例化失敗; 嵌套異常是 org.springframework.beans.BeanInstantiationException:無(wú)法實(shí)例化 [com.zaxxer.hikari.HikariDataSource]:工廠方法“dataSource”拋出異常;嵌套異常是 java.lang.IllegalStateException:無(wú)法加載驅(qū)動(dòng)程序類:com.mysql.jdbc.Driver at org。嵌套異常是 org.springframework.beans.BeanInstantiationException:無(wú)法實(shí)例化 [com.zaxxer.hikari.HikariDataSource]:工廠方法“dataSource”拋出異常;嵌套異常是 java.lang.IllegalStateException:無(wú)法加載驅(qū)動(dòng)程序類:com.mysql.jdbc.Driver at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590) ~[spring-beans-5.0. 9.RELEASE.jar:5.0.9.RELEASE] 在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9 .RELEASE] 在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) ~[spring-beans-5.0.9. 第818話.9.RELEASE.jar:5.0.9.RELEASE] ... 28 個(gè)常見的框架被省略導(dǎo)致:org.springframework.beans.BeanInstantiationException:無(wú)法實(shí)例化 [com.zaxxer.hikari.HikariDataSource]:工廠方法“dataSource”拋出例外; 嵌套異常是 java.lang.IllegalStateException:無(wú)法加載驅(qū)動(dòng)程序類:com.mysql.jdbc.Driver at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0. 9.RELEASE.jar:5.0.9.RELEASE] 在 org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:github 存儲(chǔ)庫(kù)鏈接是https://github.com/dishankgoyal/springsBoot我怎樣才能解決這個(gè)問題?
查看完整描述

1 回答

?
紅糖糍粑

TA貢獻(xiàn)1815條經(jīng)驗(yàn) 獲得超6個(gè)贊

我發(fā)現(xiàn)你的項(xiàng)目在我的最后運(yùn)行良好,你可能會(huì)嘗試在最后完成一些事情。


嘗試更改為 spring.datasource.driverClassName=com.mysql.jdbc.Driver


@ComponentScan()從主課程中刪除并離開@SpringBootApplication那里。


    @SpringBootApplication

    public class TrialApplication{    

        public static void main(String[] args) {

            SpringApplication.run(TrialApplication.class, args);

        }       

    }

按項(xiàng)目清理您的項(xiàng)目--> 重建/清理或運(yùn)行命令mvn clean install或刪除.m2/repository或重新導(dǎo)入項(xiàng)目或重新啟動(dòng) IDE/系統(tǒng)可能會(huì)有所幫助。


查看完整回答
反對(duì) 回復(fù) 2021-11-24
  • 1 回答
  • 0 關(guān)注
  • 197 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)