We have three ways to slove this:
1) If you don't need any data source, just exclude it as below:
@SpringBootApplication @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}) public class SpringBootDemoApplication { }2) If you need ds just for test purpose, say using an embedded DB like HSqldb, just add the dependency in your pom or yml file:
<dependency><groupId>org.hsqldb</groupId><artifactId>hsqldb</artifactId><scope>runtime</scope></dependency>
3) Or you want to have your own external DB configuration, you need to provided DS information in spring boot configuration file, generally add below into application.properties is fine:
spring.datasource.url=xxx
spring.datasource.* is the default prefix for spring boot data source configuration, if you use other prefix, you may need add your own ds configuration file.