SpringBoot_Coding_Challenges
SpringBoot_Coding_Challenges
Create REST endpoints to add and retrieve energy meter readings. Validate input (non-null, correct format). Use
in-memory or H2 database.
Build a CRUD API for customer data. Use Spring Data JPA. Add input validation for required fields like name and email.
Create a simple /health endpoint that returns the status of your service. Use Spring Actuator.
Add validation annotations to your request DTOs. Create a global exception handler using @ControllerAdvice.
Schedule a job that logs a message every 10 seconds using Spring's @Scheduled annotation.
Create a basic Spring Boot REST API that returns a welcome message.
Design and implement billing logic using different strategies. Each strategy should calculate based on readings. Use
Strategy Pattern.
Build APIs to enable/disable features per user. Store toggles in DB. Add caching.
Write a custom validator to check for invalid meter reading data (e.g., future timestamps).
Use @ControllerAdvice to return structured error responses for various domain and validation errors.
Allow uploading meter readings in CSV format. Parse and store them.
Design a multi-tenant energy billing platform supporting multiple suppliers. Ensure tenant isolation using discriminator or
schemas.
Consume meter readings from Kafka. On processing failure, redirect message to DLQ topic. Expose DLQ content via
REST.
Dynamically select and load billing strategies based on supplier configuration. Use Factory or Strategy pattern.
Spring Boot Coding Challenges
Secure your APIs using Spring Security. Implement roles like ADMIN and USER with different access rights.
Write an integration test using Testcontainers with a real PostgreSQL or Kafka instance.