`

Springboot启动报错:Cannot determine embedded database driver class for database type

阅读更多

 问题:启动springboot报错

报错信息如下:

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-07-13 22:59:26.567 ERROR 15380 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

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


Process finished with exit code 1

 

解决:在main入口时声明

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


原因:Springboot启动时会自动注入数据源和jpa而项目中没有配置

1 启动时把相关信息过滤掉

2 添加相关信息配置

 

 

 

好久没更啦

共勉

分享到:
评论

相关推荐

    SpringBoot启动报错Failed to determine a suitable driver class

    Spring Boot 启动报错 "Failed to determine a suitable driver class" 解决方案 在 Spring Boot 应用程序中,启动报错 "Failed to determine a suitable driver class" 是一个常见的问题。本文将详细介绍该错误的...

    springboot测试Redis连接,启动之后各种报错的解决方案.docx

    #### 错误三:Cannot determine embedded database driver class for database type NONE **错误描述**: 启动 Spring Boot 应用时,如果应用配置中包含了数据库相关组件但未明确指定数据源类型,那么可能会出现这...

    apache启动报错:httpd: apr_sockaddr_info_get() failed

    重启apache:service httpd restart虽然重启成功,但却给出如下的提示信息:httpd: apr_sockaddr_info_get() failed for hoteelhttpd: Could not reliably determine the server’s fully qualified domain name, ...

    Grad_Cam运行报错:ValueError: Unable to determine penultimate `Conv` or `Pooling` layer for layer_idx: 2

    然而,在实际操作中,有时会遇到错误,如“ValueError: Unable to determine penultimate `Conv` or `Pooling` layer for layer_idx: 2”。这个错误表明Grad-CAM无法识别到模型中的倒数第二个卷积或池化层,这是计算...

    CAN总线头文件可以运行CAN

    CAN总线头文件,支持CAN总线在VC上运行,提供良好的硬件开发环境。

    解决linux找不到hostname的处理

    ### 解决Linux服务错误UnknownHostException的方法 在Linux环境中运行服务时,可能会遇到“UnknownHostException”的异常情况,这通常发生在尝试访问或设置主机名时出现问题。本文将详细介绍如何诊断并解决这一问题...

    Springboot打成war包并在tomcat中运行的部署方法

    **错误处理:Cannot determine embedded database driver class for database type NONE** 当遇到“Cannot determine embedded database driver class for database type NONE”错误时,通常是因为Spring Boot无法...

    针对初学PHP者的疑难问答(1)

    1,问:为什么出现“APACHE.EXE: cannot determine local host name.”? 答: 由于Windows版本的Apache默认情况下不指定ServerName,所以运行时会出错。 解决的办法是修改Apache安装目录下的conf目录下的httpd.conf...

    Android重写Gallery

    public class MyGallery extends FrameLayout { // Constants private final int swipe_min_distance = 120; private final int swipe_max_off_path = 250; private final int swipe_threshold_veloicty = 400;...

    U盘过滤驱动,实现U盘只读

    Driver class implementation. sys\Usbfilter.h Driver class header file. sys\Usbfilter.inf INF file defines driver for plug and play installation. sys\Usbfilter.inf.txt Alternate INF file defines...

    搭建IC设计环境问题集锦

    - 报错示例:`libxcb-icccm.so.4 :cannot open shared object file:No such file or directory` - 解决方法: - 安装相关的 xcb 库: - `yum install xcb-util-wm` - `yum install xcb-util-image` - `yum ...

    springboot_sentinelredis

    spring.redis.database=0 spring.redis.jedis.pool.max-active=8 ``` 为了使用Sentinel对Redis进行管理,需要在配置文件中添加Sentinel节点信息: ```properties spring.redis.sentinel.master=mymaster spring....

    Determine Drive Type

    标题“Determine Drive Type”指的是在计算机编程中识别或判断磁盘驱动器类型的技能。这通常涉及到使用操作系统提供的API函数或者编程语言中的特定库来获取有关驱动器的信息。在这个场景中,标签“另类其它”可能...

    Concurrency in Main-Memory Database Systems

    Third, we describe how low-footprint main-memory database systems allow for low overhead multi-tenancy while leveraging existing operating system mechanisms to enforce service level agreements.

    解决Python安装cryptography报错问题

    ### 解决Python安装cryptography报错问题 在Python开发中,`cryptography`是一个非常重要的库,用于处理加密、解密、哈希等安全相关的功能。然而,在安装过程中可能会遇到各种错误,尤其是在不同操作系统(如Linux...

    Dimeric.Virtual.Database.

    VDB is a database library for Delphi. VDB stands for virtual database, because it abstracts Delphi‘s numerous database libraries. VDB has several advantages: - Database Library Portability. You can ...

    阿里云ossjava源码-react-native-doc:关于React-native个人踩坑笔记

    命令报错: Could not determine the dependencies of task ':app:preDebugBuild'. Could not find com.github.yalantis:ucrop:2.2.2-native. A: android/build.gradle allprojects { repositories { mavenLocal() ...

    ChromeDriver v2.20 for windows linux and mac

    其他版本的chromedriver如果找到,可以邮件我(nameamtf@qq.com),切记邮件主题必须...Resolved issue 1194: unknown error: cannot determine loading status from disconnected: received Inspector.detached event [[]]

Global site tag (gtag.js) - Google Analytics