Spring boot 啟動報錯-Reason Failed to determine a suitable driver class
啟動異常
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 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).
配置:
spring.datasource.url = jdbc:mysql\://192.168.0.20\:1504/f_me?setUnicode=true&characterEncoding=utf8
spring.datasource.username = ...
spring.datasource.password = ...
問題分析:
在spring xml配置檔案中引用了資料庫地址 所以需要對:等進行轉義處理
springboot如果沒有指定spring.datasource.driver-class-name 會根據spring.datasource.url解析自動匹配驅動類, 而springboot不是xml方式配置的 所以spring.datasource.url不需要進行轉義 ,加了轉義之後對驅動解析就有問題了, 總之問題出在spring.datasource.url上,格式不正確spring自動解析不了(我這裡是冒號前多了"\"轉義符號)
解決問題:
修改配置
spring.datasource.url =jdbc:mysql://192.168.0.20:1504/f_me?setUnicode=true&characterEncoding=utf8
spring.datasource.username = ...
spring.datasource.password = ...
(注意其它spring.datasource.url格式錯誤問題也可能會導致同樣的問題)
相關推薦
Spring boot 啟動報錯-Reason Failed to determine a suitable driver class
啟動異常 *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataS
springboot啟動專案報錯:Failed to determine a suitable driver class
轉載自:https://blog.csdn.net/AinUser/article/details/81533858 第一種情況: 在application.properties/或者application.yml檔案中沒有新增資料庫配置資訊 spring: datasource:
SpringBoot+Druid報錯Failed to determine a suitable driver class的解決
問題描述 專案中使用了自定義的Spring Listener配置,從網路獲取配置KV,在SpringBoot啟動過程中載入,然後再載入Druid環境。程式啟動時-間歇性報錯(三次啟動可能有一次報錯,其他兩次可以正常啟動): ***************
springboot啟動不能載入資料庫驅動Failed to determine a suitable driver class
1 SLF4J: Class path contains multiple SLF4J bindings. 2 SLF4J: Found binding in [jar:file:/G:/sharp/repo/ch/qos/logback/logback-classic/1.2.3/logback-
springboot啟動報錯:Failed to configure a DataSource
failed 方便 快捷 jdb 簡化 效率 alt exc 代碼 一、背景 springboot的出現,讓項目搭建變得更方便快捷,同時簡化掉很多的樣板化配置代碼,提高開發效率。 通過idea生成springboot項目,啟動報錯:Failed to configu
Springboot專案啟動報錯,提示Cannot determine embedded database driver class for database type NONE
我在springboot專案裡面引入了資料庫的配置: <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId&g
Spring boot 啟動報錯 Failed to auto-configure a DataSource
2018-03-29 22:09:30.459 INFO 10016 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*] 2018-0
新建Spring boot 啟動報錯 Failed to auto-configure a DataSource
今天學習springboot,使用idea建立專案。在選擇元件時添加了mysq 然後在第一次啟動的時候啟動報錯,錯誤資訊如下: ***************************APPLICATION FAILED TO START***************************Descriptio
Spring Boot 啟動報錯Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFa
在配置SpringBoot的時候 啟動的時候報錯 Unable to start ServletWebServerApplicationContext due to missing ServletWeb
SpringBoot啟動報錯:Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified and
今天倒騰了一下自己的SpringBoot demo的程式碼,發現啟動報瞭如下的錯誤: *************************** APPLICATION FAILED TO START *************************** Des
Spring boot 啟動報錯:com.mongodb.MongoSocketOpenException: Exception opening socket
clas cati helper res connect ava bstr efault def 詳細錯誤信息: com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.
Spring Boot 啟動報錯:LoggingFailureAnalysisReporter
char build starting zed load ring base resource enc 17:57:19: Executing task ‘bootRun‘... Parallel execution with configuration on dem
spring boot 啟動報錯:Cannot determine embedded database driver class for database type NONE
info for bubuko 報錯 spring free 增加 .com control 錯誤原因:spring boot默認會加載org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfigurati
Spring Boot 啟動報錯 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37
work 結果 frame getc director inf 中文 getclass post 使用命令 java -jar springBoot.jar 啟動項目,結果報錯如下: Exception in thread "main" java.lang.String
解決spring boot啟動報錯java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level
blog nbsp java In idea AS level def sdn 解決spring boot啟動報錯java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 學習了:https://blog.cs
Spring boot 啟動報錯 'elasticsearchTemplate' that could not be found.
Spring boot 啟動報錯 (a)異常資訊 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 201
記一次sshd啟動報錯,Failed to start OpenSSH server daemon.
sshd -t [[email protected] proj]# sshd -t @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY F
Spring-Boot啟動報錯java.lang.NoClassDefFoundError: ch/qos/logback/classic/turbo/TurboFilter
今天搭建專案的時候啟動報錯,java.lang.NoClassDefFoundError: ch/qos/logback/classic/turbo/TurboFilter 具體錯誤如下: 2018-09-15 16:06:14,588 main ERROR append
Spring boot 啟動報錯 'elasticsearchTemplate' that could not be found.
Spring boot 啟動報錯 (a)異常資訊 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' e
maven專案啟動報錯:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2
相信很多人啟動maven專案都遇到過這種型別的錯。me too! 原因1:jdk版本跟maven版本不一致導致的。舉個例子,jdk1.6是不支援maven 2.0.2的,jdk1.7才行。 解決方案:這個得自己查詢,jdk 與 maven 版本的對應,再去java b