Complete the code to specify the packaging type in a POM.xml file.
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>demo</artifactId> <version>1.0.0</version> <packaging>[1]</packaging> </project>
The <packaging> tag defines the output type of the build. For Spring Boot projects, jar is the standard packaging.
Complete the code to add the Spring Boot starter web dependency in POM.xml.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>[1]</artifactId> <version>3.0.0</version> </dependency>
The spring-boot-starter-web dependency includes everything needed to build web applications with Spring Boot.
Fix the error in the dependency declaration by completing the missing tag.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
[1]
</dependency><scope> instead of <version> when version is missing.The <version> tag specifies which version of the dependency to use. Without it, Maven may not know which version to download.
Fill both blanks to add a dependency with groupId and artifactId correctly.
<dependency> <groupId>[1]</groupId> <artifactId>[2]</artifactId> </dependency>
The groupId org.springframework.boot and artifactId spring-boot-starter-security together specify the Spring Boot security starter dependency.
Fill all three blanks to create a dependency with groupId, artifactId, and version.
<dependency> <groupId>[1]</groupId> <artifactId>[2]</artifactId> <version>[3]</version> </dependency>
This dependency adds Lombok, a popular Java library that helps reduce boilerplate code. The version 1.18.26 is a stable recent release.