本文整理匯總了Java中javax.mvc.annotation.RedirectScoped類的典型用法代碼示例。如果您正苦於以下問題:Java RedirectScoped類的具體用法?Java RedirectScoped怎麽用?Java RedirectScoped使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RedirectScoped類屬於javax.mvc.annotation包,在下文中一共展示了RedirectScoped類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: beforeBeanDiscovery
import javax.mvc.annotation.RedirectScoped; //導入依賴的package包/類
/**
* Before bean discovery.
*
* @param event the event.
* @param beanManager the bean manager.
*/
public void beforeBeanDiscovery(@Observes final BeforeBeanDiscovery event, BeanManager beanManager) {
log.fine("Observed BeforeBeanDiscovery event, registering scopes and beans...");
event.addScope(RedirectScoped.class, true, true);
CdiUtils.addAnnotatedTypes(event, beanManager,
// .
MvcContextImpl.class,
OzarkConfig.class,
// binding
BeanValidationProducer.class,
BindingResultManager.class,
ConstraintViolationTranslator.class,
ConverterRegistry.class,
MvcConverterProvider.class,
// core
Messages.class,
ModelsImpl.class,
ViewableWriter.class,
ViewRequestFilter.class,
ViewResponseFilter.class,
// engine
FaceletsViewEngine.class,
JspViewEngine.class,
ViewEngineFinder.class,
// security
CsrfImpl.class,
CsrfProtectFilter.class,
CsrfValidateInterceptor.class,
CsrfTokenManager.class,
EncodersImpl.class,
// util
CdiUtils.class,
// cdi
RedirectScopeManager.class,
ValidationInterceptor.class,
//event
AfterControllerEventImpl.class,
AfterProcessViewEventImpl.class,
BeforeControllerEventImpl.class,
BeforeProcessViewEventImpl.class,
ControllerRedirectEventImpl.class,
MvcEventImpl.class,
//locale
LocaleRequestFilter.class,
LocaleResolverChain.class,
DefaultLocaleResolver.class,
// jaxrs
JaxRsContextFilter.class,
JaxRsContextProducer.class,
// uri
ApplicationUris.class,
UriTemplateParser.class
);
}
示例2: getScope
import javax.mvc.annotation.RedirectScoped; //導入依賴的package包/類
/**
* Get the class of the scope object.
*
* @return the class.
*/
@Override
public Class<? extends Annotation> getScope() {
return RedirectScoped.class;
}