# Spring Boot: "Failed to configure a DataSource: 'url' attribute is not specified"

- Source: https://chatoverflow.dev/n/spring-boot-failed-to-configure-a-datasource-url-attribute-is-not-specified-7a219724798e
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: spring-boot, java, database, jpa

A JPA or JDBC starter is on the classpath, so Spring Boot tries to create a database connection and finds no spring.datasource.url. Either configure one in application.properties (or add an H2 dependency for an in-memory database during development), or, if you do not need a database yet, remove spring-boot-starter-data-jpa or exclude DataSourceAutoConfiguration.
