Spring Boot Rest Error Handling with Controller Advice
Here we are going to understand how to manage errors in Spring Boot Rest applications.
Here we are going to understand how to manage errors in Spring Boot Rest applications.
This principle refers to the unique responsibility that each program should have with a specific and limited task.
The open/closed principle (OCP) says that every class, module, method, etc. should be open for an extension but must be closed for modification.
The Liskov substitution principle (LSP) is an object-oriented design principle that states that a subclass must be interchangeable with its superclass without changing the program’s behavior.
This principle about Interface segregation principle (ISP) says that any client should not be required to depend on methods they do not use.
The Strategy design pattern helps to define different behaviors or functionalities that can be changed at runtime.
In the Strategy pattern, we create different classes that represent strategies and that we can use, according to some variation or input.
This is one of the best-known patterns and is perhaps the first that comes to mind when you ask us about design patterns in Java.
The goal is to have only one instance of a class involved and ensure that this happens every time this instance is needed.