trouble shooting(Cannot determine embedded database driver class for database type NONE)

报错如下:
***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

根因分析:

这个报错的原因非常多。

springboot启动时会自动注入数据源和配置jpa

解决办法:在@SpringBootApplication中排除其注入

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

这个方法是暴力的干掉了数据库连接, 这是不可能, 因为用框架写代码不可能不连接数据库的。

原文地址:https://www.cnblogs.com/geektcp/p/12299829.html

时间: 2024-11-06 03:50:13

trouble shooting(Cannot determine embedded database driver class for database type NONE)的相关文章

解决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

解决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

在spring boot项目中,我们在pom.xml文件中添加了mysql和mybatis的依赖,我们常常遇到下面这样的问题: Description: Cannot determine embedded database driver class for database type NONE Action: If you want an embedded database please put a supported one on the classpath. If you have data

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

由于我不需要数据库,启动springboot报错: Cannot determine embedded database driver class for database type NONE If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you ma

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

错误原因:spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration类,DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean.因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错. 解决办法:第一种:在Applicat

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.在启动类上加上 @SpringBootAp

Description: Cannot determine embedded database driver class for database type NONE 解决

环境eclipse 4.7  jdk1.8    搭建springcloud子父项目报错 出现了这两种报错 解决  加上下面两个注解 @ComponentScan(basePackages = {"com.wf.zhang.springcloud.dao"}) @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}) @ComponentScan(basePackages = {"com.wf.