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).

这个错误网上有很多种情况,但是我遇到的有两个:

第一种:进程占用;

这个错误是看同一个项目进程被占用,如果有的话,关闭就行。

第二种:pom文件资源配置有问题

        <!-- 资源目录 -->
<resources>
<resource>
<!-- 设定主资源目录 -->
<directory>src/main/java</directory>
<!-- maven default生命周期,process-resources阶段执行maven-resources-plugin插件的resources目标处理主资源目下的资源文件时,只处理如下配置中包含的资源类型 -->
<includes>
<include>**/*.xml</include>
</includes>
<!-- maven default生命周期,process-resources阶段执行maven-resources-plugin插件的resources目标处理主资源目下的资源文件时,不处理如下配置中包含的资源类型(剔除下如下配置中包含的资源类型)-->
<excludes>
<exclude>**/*.yml</exclude>
</excludes>
<!-- maven default生命周期,process-resources阶段执行maven-resources-plugin插件的resources目标处理主资源目下的资源文件时,指定处理后的资源文件输出目录,默认是${build.outputDirectory}指定的目录-->
<!--<targetPath>${build.outputDirectory}</targetPath> -->
<!-- maven default生命周期,process-resources阶段执行maven-resources-plugin插件的resources目标处理主资源目下的资源文件时,是否对主资源目录开启资源过滤 -->
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>

我出现的问题是第二种,没有配置src/main/resources这个目录的资源

embedded database (H2, HSQL or Derby), please put it on the classpath的更多相关文章

  1. If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    学习Spring Boot 过程中遇到了下列这个问题 Description: Failed to configure a DataSource: 'url' attribute is not spe ...

  2. Spring boot 启动错误处理: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...

    错误原因 在pom中引入了mybatis-spring-boot-starter ,Spring boot默认会加载org.springframework.boot.autoconfigure.jdb ...

  3. 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 ne

    更多精彩关注微信公众号 错误原因 在pom中引入了mybatis-spring-boot-starter ,Spring boot默认会加载org.springframework.boot.autoc ...

  4. Consider the following: If you want an embedded database (H2, HSQL or Der...

    这个坑把java进程干掉就可以了,因为占用了 Description: Failed to configure a DataSource: 'url' attribute is not specifi ...

  5. 异常 SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]

    使用Spring 的JDBCtemplate 调用数据库的时候 出现了如下的问题 SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-S ...

  6. SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase] 错误

    在一次改bug的过程,爆出了数据库错误,但是一看后面控制台,并没有爆出以前的具体的数据库错误的原因,而是 SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, In ...

  7. SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]

    Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-co ...

  8. SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase

    sqlserver 插入数据的时候 插入失败,报错内容为 “SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, ...

  9. 报错Cannot determine embedded database driver class for database type NONE解决方法

    由于我不需要数据库,启动springboot报错: Cannot determine embedded database driver class for database type NONE If ...

随机推荐

  1. (十二)DVWA全等级SQL Injection(Blind)盲注--SQLMap测试过程解析

    一.测试前分析 前文<DVWA全等级SQL Injection(Blind)盲注-手工测试过程解析> 通过手工测试的方式详细分析了SQL Injection(Blind)盲注漏洞的利用过程 ...

  2. java类的加载顺序和实例化顺序(Demo程序)

    一.main函数中实例化对象 父类 package com.learn; public class Father { //静态变量 public static int num_1 = 1; //静态代 ...

  3. 解读Spring源码之前的准备

    请忽略以下的文章,现在回过头来才发现学习源码不用如此复杂 1.IDEA 新建一个maven项目, 2.pom 中倒入 spring5 的基本包,然后利用maven 插件down下源码 3.然后就可以开 ...

  4. 【Navicat】Navicat for MongoDBv15.0.6破解版(附破解教程)

    安装包下载链接:https://download.csdn.net/download/l1028386804/12519681 Navicat for MongoDB 15是一款功能十分强大的数据库管 ...

  5. Java——String类(常用类)

    一.String类——描述字符串 常用的方法简单介绍: 1.charAt() 获取对应位置的字符 2.length() 获取字符串的长度 3.concat() 在字符串的尾部追加内容-----相当于连 ...

  6. MSSQL2008下备份好的*.bak--->>>恢复到--->>>MSSQL2014(解决办法)

    MSSQL2008下备份好的*.bak--->>>恢复到--->>>MSSQL2014(解决办法) 在进行CTE训练时(同时也要理解下窗口函数的应用),发现不能继续 ...

  7. matlab之指派问题(整数规划)

    1 c=[ ; ; ; ]; c=c(:);%将矩阵C按列拉直,然后赋给C,例如矩阵C=[,,;,,],操作完后就是列向量1,,,,, a=zeros(,); for i=: a(i,(i-)*+:* ...

  8. WebDriverWait

    显示等待 WebDriverWait( driver, timeout, poll_frequency, ignored_exceptions) driver: 传入WebDriver实例,即webd ...

  9. sourcetree 安装破解注册方法

    1.下载sourcetree安装包 2.点击安装到下图步骤 3.在网盘中下载accounts.json  文件,( 链接:https://pan.baidu.com/s/1tJd_xCh-B-oOwd ...

  10. 前后端分离项目 nginx配置实践

    新项目采用前后端分离的方式开发,前后端代码打算分开部署(同机器且同域名),但打算支持后端依然可访问静态资源. 搜索nginx配置大部分都通过url前缀进行转发来做前后端分离,不适用目前项目. 说明 前 ...