Module io.jstach.opt.spring.webflux
Package io.jstach.opt.spring.webflux
Class ViewSetupBeanPostProcessor
java.lang.Object
io.jstach.opt.spring.webflux.ViewSetupBeanPostProcessor
- All Implemented Interfaces:
BeanPostProcessor
A
BeanPostProcessor
that it registers a HandlerResultHandler
that
automatically applies all JStachioModelViewConfigurer
instances to views before
rendering.-
Constructor Summary
ConstructorDescriptionConstructor for Spring to inject the application context. -
Method Summary
Modifier and TypeMethodDescriptionpostProcessAfterInitialization
(Object bean, String beanName) Look for aViewResolutionResultHandler
and replace it with a wrapper that configuresJStachioModelView
instance using theJStachioModelViewConfigurer
s in the current context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitialization
-
Constructor Details
-
ViewSetupBeanPostProcessor
Constructor for Spring to inject the application context.- Parameters:
context
- supplied by spring used to look forJStachioModelViewConfigurer
s.
-
-
Method Details
-
postProcessAfterInitialization
Look for aViewResolutionResultHandler
and replace it with a wrapper that configuresJStachioModelView
instance using theJStachioModelViewConfigurer
s in the current context.- Specified by:
postProcessAfterInitialization
in interfaceBeanPostProcessor
- Parameters:
bean
- the bean that is being createdbeanName
- the name of the bean- Returns:
- Object a bean wrapped with
ViewSetupBeanPostProcessor.ViewSetupResultHandler
if needed - Throws:
BeansException
- in case of errors
-