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

Example 1: failed to determine a suitable driver class

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})

Example 2: failed to determine a suitable driver class

spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration

Tags:

Java Example