SpringBoot框架:'url' attribute is not specified and no embedded datasource could be configured問題處理
一、問題如下:
Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
未能配置資料來源:“url”屬性未指定,無法配置嵌入式資料來源。
Reason: Failed to determine a suitable driver class.
無法確定合適的驅動程式類別。
二、問題解決:
1、問題分析:
在程式的配置檔案中新增引入了資料庫驅動依賴包
2、問題解決:
(1)去掉自動連線:
在未配置資料庫連線資訊時,可以將入口類中的註解修改為以下程式碼:
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
即新增(exclude = {DataSourceAutoConfiguration.class}),排除自動連線。
(2)配置資料來源資訊:
在application.yml中配置資料庫的連線資訊,執行程式就不會報錯。
相關推薦
SpringBoot框架:39;url39; attribute is not specified and no embedded datasource could be configured問題處理
一、問題如下: Description: Failed to configure a DataSource: \'url\' attribute is not specified and no embedded datasource could be configured.
Failed to configure a DataSource: 39;url39; attribute is not specified and no embedded datasource could be configured.
問題: 問題分析及解決方案 問題原因: Mybatis沒有找到合適的載入類,其實是大部分spring - datasource - url沒有載入成功,分析原因如下所示.
關於“Failed to configure a DataSource: 39;url39; attribute is not specified and no embedded datasource could be configured.”
Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activ
解決:Failed to configure a DataSource: 39;url39; attribute is not specified and no embedded datasource could be configured.
yml或者properties檔案沒有被掃描到,需要在pom檔案中<build></build>新增如下.來保證檔案都能正常被掃描到並且載入成功.
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
技術標籤:springbootspringboot *************************** APPLICATION FAILED TO START ***************************
關於idea更新到2020.2.3無法建立web專案原因 library is not specified
推薦 IntelliJ IDEA 2020.2.3永久破解啟用教程(親測有效) 正文開始 今天將idea更新到了最新版2020.2.3,結果發現新建java project或者model時找不到原來的那些可選勾選內容了,提示Error“library is not specified”
ubuntu下安裝helm遇到錯誤Error: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository or cannot be reached
如題,在執行 helm repo add stablehttps://kubernetes-charts.storage.googleapis.com 的時候遇到錯誤:
mysql docker-compose啟動異常:Database is uninitialized and password option is not specified
## docker-compose 定義,無法正常執行 version: \'3.2\' services: mysql: image: mysql:5.7.35 ports: - \"3306:3306\"
用navicat連線資料庫報錯:1130-host ... is not allowed to connect to this MySql server如何處理
這個問題是因為在資料庫伺服器中的mysql資料庫中的user的表中沒有許可權(也可以說沒有使用者),下面將記錄我遇到問題的過程及解決的方法。
Springboot啟動報錯Error creating bean with name 39;xxx39; defined in URL [xxx]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instan
Error creating bean with name \'xxx\' defined in URL [xxx]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [xxx]: Constru
python https 無法訪問 SSLError("Can\39;t connect to HTTPS URL because the SSL module is not available
1,需要檢查python 安裝的時候是否支援 https 進入python 環境,import ssl 如果正常匯入就可以使用https,不能匯入就需要進入下一步。
Python pip Caused by SSLError("Can39;t connect to HTTPS URL because the SSL module is not available.")
Windows 10, Python 3.8 pip install opencv-python Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=\'pypi.org\', port=44
Python3.7.7報錯Can39;39;t connect to HTTPS URL because the SSL module is not available
簡述 從官網下載了Python3.7.7,直接編譯安裝後,使用pip3出現了報錯資訊: Can\'t connect to HTTPS URL because the SSL module is not available
C:\php-7.4.5-nts-Win32-vc15-x64\php-cgi.exe - FastCGI 程序意外退出 問題解決 PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unk
win10兩臺電腦,一臺裝了vs2019iis正常,另一臺沒裝iisphp環境出現些故障,深查原因,出現如下警告,現程式碼部分
Angular9 cdk-virtual-scroll-viewport39; is not a known element 報錯解決方案
題外話 好久沒更新部落格了,不是因為最近沒在學習,而是最近學的多了,感覺記流水賬式的博文是在汙染網路,以後的博文都會是網上不好找或找不到的問題
Selenium+python,alert報TypeError: 39;Alert39; object is not callable的解決方法
selenium通過設定警告彈框處理的部分程式碼如下: driver.find_element_by_css_selector(\'#s-usersetting-top\').click()#通過css找到設定按鈕
springBoot整合Elasticsearch丟擲Factory method 39;restHighLevelClient39; threw exception; nested exception is java.lang.NoSuchFieldError: IGNORE_DEPRECATIONS
org.springframework.beans.factory.BeanCreationException: Error creating bean with name \'restHighLevelClient\' defined in com.example.demo.MyHighLevelEsRestDemoApplication: Bean instantiation via fac
使用SpringBoot和Thymealf使用restful出現Request method 39;POST39; not supported]
一般來說,資源操有查詢,新增,刪除,更改四種類型,對應HTTP協議中四類請求:GET,POST,DELETE,PUT。
springboot 報錯 Could not autowire. No beans of 39;XXX39; type found.
在idea開發專案時候,自動裝載的時候報錯Could not autowire. No beans of ‘DebtProdService’ type found.
MYSQL---Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 39;
MYSQL---Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column \'