Failed to configure a DataSource: βurlβ attribute is not specified and no embedded datasource could be configured.
π How I solved the errors that I encountered
Error message

Solution
This was easily solved by adding the following (exclude = DataSourceAutoConfiguration.class) next to @SpringBootApplication.
Full code
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@SpringBootApplication (exclude = DataSourceAutoConfiguration.class)
public class YourApplication {
public static void main(String[] args) {
SpringApplication.run(YourApplication.class, args);
}
}
Leave a comment