Saturday, March 4, 2023

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

To resolve : 

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured



Just add 
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class }) works for me.

I was getting same error I tried with @EnableAutoConfiguration(exclude=...) didn't work.

For those that are wondering where to add @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class }), as it has been asked by user as well. You need to add it to the main Application class which is under src>main>java. By default it is set to @SpringBootApplication

 

Guitar Chords

click on   Guitar Chords Family