0% found this document useful (0 votes)
2 views

SpringBoot_Coding_Challenges

The document outlines a series of Spring Boot coding challenges categorized by difficulty: Easy, Medium, and Hard. Each challenge includes specific tasks such as creating REST APIs, implementing validation, and managing billing systems. The challenges cover a range of topics including health checks, customer data management, feature toggles, and advanced concepts like multi-tenancy and role-based access control.

Uploaded by

msrbharath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SpringBoot_Coding_Challenges

The document outlines a series of Spring Boot coding challenges categorized by difficulty: Easy, Medium, and Hard. Each challenge includes specific tasks such as creating REST APIs, implementing validation, and managing billing systems. The challenges cover a range of topics including health checks, customer data management, feature toggles, and advanced concepts like multi-tenancy and role-based access control.

Uploaded by

msrbharath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Spring Boot Coding Challenges

Easy - Basic Meter Reading API

Challenge: Basic Meter Reading API

Create REST endpoints to add and retrieve energy meter readings. Validate input (non-null, correct format). Use

in-memory or H2 database.

Easy - Simple Customer API

Challenge: Simple Customer API

Build a CRUD API for customer data. Use Spring Data JPA. Add input validation for required fields like name and email.

Easy - Spring Boot Health Check

Challenge: Spring Boot Health Check

Create a simple /health endpoint that returns the status of your service. Use Spring Actuator.

Easy - DTO Validation

Challenge: DTO Validation

Add validation annotations to your request DTOs. Create a global exception handler using @ControllerAdvice.

Easy - Simple Scheduler

Challenge: Simple Scheduler

Schedule a job that logs a message every 10 seconds using Spring's @Scheduled annotation.

Easy - Hello World REST App

Challenge: Hello World REST App

Create a basic Spring Boot REST API that returns a welcome message.

Medium - Customer Billing Engine

Challenge: Customer Billing Engine

Design and implement billing logic using different strategies. Each strategy should calculate based on readings. Use

Strategy Pattern.

Medium - Feature Toggle System


Spring Boot Coding Challenges

Challenge: Feature Toggle System

Build APIs to enable/disable features per user. Store toggles in DB. Add caching.

Medium - Meter Reading Validation

Challenge: Meter Reading Validation

Write a custom validator to check for invalid meter reading data (e.g., future timestamps).

Medium - Custom Exception Handling

Challenge: Custom Exception Handling

Use @ControllerAdvice to return structured error responses for various domain and validation errors.

Medium - REST API with Pagination and Sorting

Challenge: REST API with Pagination and Sorting

Create a pageable/sortable endpoint for meter readings or customers.

Medium - Upload and Parse CSV

Challenge: Upload and Parse CSV

Allow uploading meter readings in CSV format. Parse and store them.

Hard - Multi-Tenant Billing System

Challenge: Multi-Tenant Billing System

Design a multi-tenant energy billing platform supporting multiple suppliers. Ensure tenant isolation using discriminator or

schemas.

Hard - Kafka Consumer with Dead Letter Queue

Challenge: Kafka Consumer with Dead Letter Queue

Consume meter readings from Kafka. On processing failure, redirect message to DLQ topic. Expose DLQ content via

REST.

Hard - Dynamic Strategy Loader

Challenge: Dynamic Strategy Loader

Dynamically select and load billing strategies based on supplier configuration. Use Factory or Strategy pattern.
Spring Boot Coding Challenges

Hard - Task Scheduler with Retry and Idempotency

Challenge: Task Scheduler with Retry and Idempotency

Run billing tasks on a schedule. Ensure retry on failure and idempotency.

Hard - Role-Based Access Control

Challenge: Role-Based Access Control

Secure your APIs using Spring Security. Implement roles like ADMIN and USER with different access rights.

Hard - Testcontainers Integration Test

Challenge: Testcontainers Integration Test

Write an integration test using Testcontainers with a real PostgreSQL or Kafka instance.

You might also like