Lecture 34 Demo

Unit V: Spring Boot Annotations & Build Systems

Explore Spring Boot annotations and compare Maven vs Gradle build configurations.

🏷️ Select Annotation Type

Select an annotation type to see examples and explanations...

📦 Maven Configuration (pom.xml)

<parent>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-parent</artifactId>
  <version>3.1.0</version>
</parent>

<dependencies>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
  </dependency>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
  </dependency>
</dependencies>

⚙️ Gradle Configuration (build.gradle)

plugins {
  id 'org.springframework.boot' version '3.1.0'
  id 'io.spring.dependency-management' version '1.1.0'
  id 'java'
}

dependencies {
  implementation 'org.springframework.boot:spring-boot-starter-web'
  implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
  testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

🚀 Common Spring Boot Starters

spring-boot-starter-web
spring-boot-starter-data-jpa
spring-boot-starter-security
spring-boot-starter-test
spring-boot-starter-actuator
spring-boot-starter-validation

💡 Classroom Discussion Points