How to solve springboot "Cannot determine embedded database driver class fo...
source link: http://adnjavainterview.blogspot.com/2022/10/how-to-solve-springboot-cannot.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Saturday, 29 October 2022
How to solve springboot "Cannot determine embedded database driver class for database type NONE" Exception
I posted a last post a year ago, sorry to the users to have disconnectivity of the blog posts due to some reasons. Today we will discuss about one of the issue will face during start of spring boot application without configuring any database things.
If you are the Spring boot beginer and trying to run the application without configuring the datasource in your application then you can get below exception,
*************************** 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). - [report:42] - [] - []
The above issue we can solve in two ways as follows,
1) Fixing with application.properties file
you can add the fallowing line in application.properties file,
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
2) Fixing with Configuration code
You can add EnableAutoConfiguration annotation with DataSourceAutoConfiguration exclude like below,
@SpringBootApplication @EnableAutoConfiguration (exclude = { DataSourceAutoConfiguration.class }) public class SpringbootApplication { SpringApplication.run(SpringbootApplication.class, args); }
or you can also add excludes to the SpringBootApplication annotation itself,
@SpringBootApplication (exclude = { DataSourceAutoConfiguration.class }) public class SpringbootApplication { SpringApplication.run(SpringbootApplication.class, args); }
4 comments:
Thank you, I’ve just been searching for information about this topic
Reply
Online Classes- Anonymous11 May 2023 at 14:33
SAP S/4HANA provides businesses with a wide range of collaboration options that can help them streamline their operations, reduce costs, and improve customer satisfaction. From procurement and finance to supply chain and sales, SAP S/4HANA offers a comprehensive set of collaboration tools that can help businesses stay ahead of the competition and drive growth in the digital age. For more information, visit our website SAP Consulting Services or call us @ 1-289-952-8845.
Reply Nice... very informative article, keep posting
Reply
Recommend
-
30
A Rust driver crate for the ADXL355 digital accelerometer. This driver accepts an
-
16
Solve Error “char cannot be dereferenced” in Java Are you facing the error “char cannot be dereferenced”? So in this article, we’re going to see the main reason behi...
-
13
Solve Error “int cannot be dereferenced” in Java Dereferencing means accessing an object from the heap using a reference variable Or we can say It is a process of accessing the referred value by a reference....
-
12
Submitted by NanoDano on Tue, 05/14/2019 - 17:54 Introduction If you are trying to run your Node.js application and you get something like this:...
-
7
SQL Error – The database principal owns a schema in the database, and cannot be dropped Have you ever faced this error while dropping a USER from a Database? Today while dropping a USER I faced this error an...
-
5
5 Problems That Artificial Intelligence Cannot Yet SolveMay 25th 2021 new story5
-
28
SQL Error – The operation cannot be performed on a database with database snapshots or active DBCC replicas Today while restoring a Database and Dropping it I came across following errors: Error #1....
-
1
Abstract+Introduction 本文作者提出了IRQDebloat,通过自动硬件重写来禁用不需要的硬件功能。本文基于以下观点:系统的外部输入大多是通过interrupt requests(IRQs)来进行传递的,IRQDebloat系统地探索了目标固件中的中断处理代码,识别出针对每个外...
-
8
Home ...
-
3
How to Solve the Common Problems of Embedded FirmwareOctober 3rd 2022 new story
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK