Home Assignment 3: Modern Application Development
Overview
Build scalable web services using Spring Boot and RESTful architecture.
Due Date: March 18, 2026, 11:59 PM
Points: 100
Target Audience: CO5 (Spring Boot and REST)
Objective
Build scalable web services using Spring Boot and RESTful architecture.
Learning Objectives
By completing this assignment, you will:
- Create RESTful endpoints using Spring MVC annotations.
- Handle request payload and path parameters with proper mappings.
- Configure Spring Boot properties for runtime behavior.
- Use Spring Boot Actuator and startup runners for operational visibility.
Question 1: Building a RESTful CRUD API (CO5)
Create a Spring Boot application to manage a Book Inventory.
Requirements
- Use Spring Initializr to set up the project structure.
- Create a
RestControllernamedBookController. - Implement these API endpoints using proper annotations:
GET /books: return list of all books.POST /books: add a new book (use@RequestBody).GET /books/{id}: return a specific book (use@PathVariable).
Deliverable
Controller class code and a screenshot of the project structure.
Question 2: Actuator and Configuration (CO5)
Enhance the Spring Boot application from Question 1 with monitoring and custom configuration.
Requirements
- Add Spring Boot Actuator dependency in
pom.xmlorbuild.gradle. - In
application.properties, change server port from8080to9090. - Implement a
CommandLineRunnerbean that logs: Server Started Successfully for Book Inventory.
Deliverable
application.properties content and runner class code.
NoteAssignment Guidelines
- Build Question 2 on top of Question 1 in the same Spring Boot project.
- Use proper REST naming and annotation usage consistently.
- Keep configuration files and source packages clean and organized.
- Test each endpoint before final submission.
Deliverables
- Spring Boot source code with controller and model/helper classes.
- Build file (
pom.xmlorbuild.gradle) showing required dependencies. application.propertiesand runner class implementation.- Project structure screenshot.
README.txtwith:- Your name and roll number
- How to run the Spring Boot app
- API test examples for each endpoint
- Any assumptions or limitations
TipSubmission Format
- Verify all required endpoints are running and return expected output.
- Confirm POST request accepts JSON body with
@RequestBody. - Confirm
GET /books/{id}works correctly for valid IDs. - Verify application runs on port 9090.
- Confirm startup log from
CommandLineRunnerappears in console. - Include screenshot and all required source/config files.
- Zip and submit as
RollNumber_Assignment3_YourName.zipbefore deadline.
ImportantEvaluation Criteria
| Criteria | Points | Description |
|---|---|---|
| REST API Implementation | 45 | Correct endpoints, annotations, request handling, and path variable use |
| Actuator and Configuration | 25 | Dependency setup, port configuration, and operational setup |
| CommandLineRunner Execution | 10 | Runner implementation and correct startup log behavior |
| Code Quality and Structure | 15 | Organized code, naming, readability, and project structure |
| Documentation and Evidence | 5 | README quality and project structure screenshot |
| Total | 100 |