Package ch.squaredesk.nova.comm.rest
Class RestBeanPostprocessor
- java.lang.Object
-
- ch.squaredesk.nova.comm.rest.RestBeanPostprocessor
-
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
public class RestBeanPostprocessor extends Object implements org.springframework.beans.factory.config.BeanPostProcessor
This class is used to register the properly annotated Rest endpoint classes. Since we implement this as a BeanPostProcessor we are 1.) depending on Spring and 2.) this will only work for beans known to Spring's ApplicationContext. An alternative would be to not rely on Spring at all and manually register the packages with REST endpoints. Since we think that the first approach makes for a much nicer API, we bit the bullet and went for the Spring dependency
-
-
Constructor Summary
Constructors Constructor Description RestBeanPostprocessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectpostProcessAfterInitialization(Object bean, String beanName)ObjectpostProcessBeforeInitialization(Object bean, String beanName)
-
-
-
Method Detail
-
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
- Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
- Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
-