Dependency Management
Let’s learn about the set of basic dependencies required to start a Spring Boot project.
Gradle build
Let’s look at the build.gradle
file.
It contains dependencies such as spring-boot-starter-web
, spring-boot-starter-data-jpa
, and H2
that we’ve added to our Spring Boot application along with Java and Spring Boot plugins.
Press + to interact
plugins {id 'org.springframework.boot' version '2.6.2'id 'io.spring.dependency-management' version '1.0.11.RELEASE'id 'java'}group = 'io.educative'version = '0.0.1-SNAPSHOT'sourceCompatibility = '1.8'repositories {mavenCentral()}dependencies {implementation 'org.springframework.boot:spring-boot-starter-web'implementation 'org.springframework.boot:spring-boot-starter-data-jpa'runtimeOnly 'com.h2database:h2'testImplementation 'org.springframework.boot:spring-boot-starter-test'}test {useJUnitPlatform()}
Spring project dependencies
The most convenient way to build a Spring Boot project is ...