Frameworks

Custom Exceptions

A custom exception is your own exception class that describes one specific failure in your application, such as a student who does not exist. It extends RuntimeException (or Exception) and carries a clear name and message, so the problem is obvious in code, logs, and API responses. It is used instead of generic exceptions, because

Custom Exceptions Read More »

Exception Handling

Exception Handling in Spring Boot is a structured framework for intercepting, managing, and resolving errors that occur during the execution of HTTP requests. Instead of letting unhandled errors crash operations or expose internal stack traces and server details to users, Spring Boot provides mechanisms to catch exceptions gracefully and return meaningful, client-friendly HTTP responses. 1.

Exception Handling Read More »

REST API Testing

REST API testing means calling your endpoints directly, without a front-end, to check that they return the right data and status codes. An API client such as Postman lets you choose the HTTP method, URL, headers, and body, then shows the response, status code, and time. It is used to find bugs early, confirm that

REST API Testing Read More »

REST API Validation

REST API Validation is the process of checking incoming HTTP request data to ensure that it satisfies the required constraints before the application processes it. In Spring Boot, validation is commonly implemented using Jakarta Bean Validation annotations such as @NotBlank, @NotNull, @Email, @Size, @Min, and @Max. By applying @Valid to a request body parameter in

REST API Validation Read More »

ResponseEntity

ResponseEntity is a Spring Framework class used to control the complete HTTP response returned by a REST API. It allows developers to specify the response body, HTTP status code, and HTTP headers according to the result of an operation. In Spring Boot applications, ResponseEntity is commonly used in REST controllers to return appropriate responses for

ResponseEntity Read More »

Scroll to Top