各位邦友大神,我又來請教了XD
這次要請教的情況如下,先列出本人覺得可能正相關的內容
IDE:Eclipse IDE for Java Developers - Version: 2020-12 (4.18.0)
套件管理:Maven 3
JDK:11
MySQL:8
原先可以直接透過專案的Application啟動Tomcat及運作(IDE環境設定好就沒再動)
換了Eclipse(同官方下載版本),就一直恢復不了原本環境,
換了Eclipse的啟動Console為
APPLICATION FAILED TO START
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
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 activate it (no profiles are currently active).
我這邊嘗試做過換台電腦、同台電腦僅換Eclipse、換掉SQL的Jar、Eclipse一些設定,都無法排除此情況
還請有路過的大神指點方向 或 可能我疏漏掉的步驟
謝謝指教
看起來是你的library沒有載入相關的jar檔, 導致datasource配置失敗,
1.也許可以檢查看看pom檔裡面是否有正確引入相關jdbc的dependency
2.或者是查看是否需要手動引入jar包, 因為他也說無法斷定driver class, 如果是mysql的也許可以用手動引入mysql jdbc driver的jar, 並放置在你項目下的classpath裡面
供參考