springboot启动时报错Cannot determine embedded database driver class for database type NONE解决办法

springboot启动报错如下图:

出错原因:springboot启动时会自动注入数据源及配置jpa

解决办法:

1,在pom文件中加h2引用

<dependency>    <groupId>com.h2database</groupId>    <artifactId>h2</artifactId>    <scope>runtime</scope></dependency>

2.在启动类上加上

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})

 3,以上解决办法只是针对该springboot应用不与数据库之间有交互的场景下,使用,

若应用与数据库有交互,那么@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class}) 是不能用的!!!!!

原文地址:https://www.cnblogs.com/liqiang0728/p/11777405.html

时间: 2024-08-01 07:24:46

springboot启动时报错Cannot determine embedded database driver class for database type NONE解决办法的相关文章

maven项目或者SpringBoot项目启动时报错在本地仓库中找不到jar包的解决办法

经常遇到项目检出来后是导入开发工具eclipse中pom文件出错问题,项目启动时遇到了一些列的jar包找不到的问题,所以换个开发平台到IDEA以为会好些,结果同样的问题还是会出现的,为了找到具体的解决办法,针对以下我遇到的此类问题做总结,希望能帮助到一部分人,所以帮我此次的解决办法记录下来,帮助大家也方面自己. 一.问题现象 二.解决办法 (1)从报错截图中大概知道是因为在本地的maven仓库中找不到“mchange-commons-java-0.2.9.jar ”这个jar包 所以就到本地的m

docker启动时报错Error response from daemon: driver failed programming external connectivity on endpoint *

公司服务器由于断电重启,部署在docker服务上的一些web服务需要重新开启容器, [root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d77c2c6b3650 chandao:latest "/app/docker-entrypo…" 7 days ago Up About an hour 0.0.0.0:7075->80/tcp chandao 当重新开启容器的

升级openssh编译时报错“configure: error: *** working libcrypto not found, check config.log”的解决办法

问题描述 在linux上,欲将OpenSSH_6.4p1编译升级到OpenSSH_8.0p1时,执行了./configure ....编译命令后报错,报错信息如下: configure: error: *** working libcrypto not found, check config.log *** 或: configure: error: *** OpenSSL headers missing - please install first or check config.log ***

springboot启动时报错 错误: 找不到或无法加载主类 com.xxx.xxx.Application

1. Q1 错误: 找不到或无法加载主类 com.xxx.xxx.Application 解决办法:啥也不动,maven clean下,重启 1. Q2 layui控制下拉框高度 解决 .layui-unselect dl { max-height:200px; } 原文地址:https://www.cnblogs.com/baijinqiang/p/11829525.html

Eclipse启动报错:A java runtime Environment(JRE) or java Development……的解决办法

打开Eclipse图标,结果报错如下. 网上都说是环境变量PATH的问题,联想到由于以前环境变量PATH=E:\Java\jdk1.8.0_91;而没有通过JAVA_HOME来配置. 昨天安装了Tomcat之后需要用到JAVA_HOME,于是添加了JAVA_HOME环境变量,并重新配置了环境变量PATH=%JAVA_HOME%; 解决方案: 变量名:JAVA_HOME 变量值:E:\Java\jdk1.8.0_91 变量名:CLASSPATH 变量值:.;%JAVA_HOME%\lib; 变量名

springboot启动报错:Cannot determine embedded database driver class for database type NONE.

1 package cn.zb.test; 2 3 import org.springframework.boot.SpringApplication; 4 5 import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 6 7 import org.springframework.boot.autoconfigure.SpringBootApplication; 8 9 import org.springfram

解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE

问题 如下: 2017-07-16 08:50:57.436  INFO 13524 --- [           main] c.p.p.web.PointshopWebApplication        : Starting PointshopWebApplication on MSI with PID 13524 (D:\javaProject\com.ppdai.pointshop\pointshop-web\target\classes started by yangliweng

解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE(转)

问题 如下: 2017-07-16 08:50:57.436  INFO 13524 --- [           main] c.p.p.web.PointshopWebApplication        : Starting PointshopWebApplication on MSI with PID 13524 (D:\javaProject\com.ppdai.pointshop\pointshop-web\target\classes started by yangliweng

spriing boot 启动报错:Cannot determine embedded database driver class for database type NONE

最近在学习使用spring boot.使用maven创建好工程,只引用需要用到的spring boot相关的jar包,除此之外没有任何的配置. 写了一个最简单的例子,如下所示: 1 package com.torlight; 2 3 import org.springframework.boot.SpringApplication; 4 import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 5 import