Class RestControllerBeanPostProcessor
java.lang.Object
com.bobocode.bring.web.servlet.bbp.RestControllerBeanPostProcessor
- All Implemented Interfaces:
com.bobocode.bring.core.bpp.BeanPostProcessor
public class RestControllerBeanPostProcessor
extends Object
implements com.bobocode.bring.core.bpp.BeanPostProcessor
A
BeanPostProcessor
implementation that processes bean initialization
annotated with @RestController
.
This post-processor checks if the bean is annotated with @RestController
and if it implements the BringServlet
interface. If not, it throws a
MissingBringServletImplException
.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpostProcessInitialization
(Object bean, String beanName) Processes bean initialization annotated with@RestController
.
-
Constructor Details
-
RestControllerBeanPostProcessor
public RestControllerBeanPostProcessor()
-
-
Method Details
-
postProcessInitialization
Processes bean initialization annotated with@RestController
.- Specified by:
postProcessInitialization
in interfacecom.bobocode.bring.core.bpp.BeanPostProcessor
- Parameters:
bean
- the bean instancebeanName
- the name of the bean- Returns:
- the processed bean
- Throws:
MissingBringServletImplException
- if the bean is annotated with@RestController
but does not implement theBringServlet
interface
-