當前位置: 首頁>>代碼示例>>Java>>正文


Java SessionScoped類代碼示例

本文整理匯總了Java中javax.faces.bean.SessionScoped的典型用法代碼示例。如果您正苦於以下問題:Java SessionScoped類的具體用法?Java SessionScoped怎麽用?Java SessionScoped使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SessionScoped類屬於javax.faces.bean包,在下文中一共展示了SessionScoped類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: jsfScopeAnnotationsConfigurer

import javax.faces.bean.SessionScoped; //導入依賴的package包/類
@Bean
@ConditionalOnProperty(value = "jsf.scope-configurer.jsf.enabled", havingValue = "true", matchIfMissing = true)
public static BeanFactoryPostProcessor jsfScopeAnnotationsConfigurer(Environment environment) {
	CustomScopeAnnotationConfigurer scopeAnnotationConfigurer = new CustomScopeAnnotationConfigurer();

	scopeAnnotationConfigurer.setOrder(environment.getProperty("jsf.scope-configurer.jsf.order", Integer.class, Ordered.LOWEST_PRECEDENCE));

	scopeAnnotationConfigurer.addMapping(NoneScoped.class, ConfigurableBeanFactory.SCOPE_PROTOTYPE);
	scopeAnnotationConfigurer.addMapping(RequestScoped.class, WebApplicationContext.SCOPE_REQUEST);
	scopeAnnotationConfigurer.addMapping(javax.faces.bean.ViewScoped.class, ViewScope.SCOPE_VIEW);
	scopeAnnotationConfigurer.addMapping(javax.faces.view.ViewScoped.class, ViewScope.SCOPE_VIEW);
	scopeAnnotationConfigurer.addMapping(SessionScoped.class, WebApplicationContext.SCOPE_SESSION);
	scopeAnnotationConfigurer.addMapping(ApplicationScoped.class, WebApplicationContext.SCOPE_APPLICATION);

	return scopeAnnotationConfigurer;
}
 
開發者ID:joinfaces,項目名稱:joinfaces,代碼行數:17,代碼來源:JsfScopeAnnotationsAutoConfiguration.java

示例2: annotationsToExclude

import javax.faces.bean.SessionScoped; //導入依賴的package包/類
/**
 * Ignore ViewScoped, SessionScoped, RequestScoped and NoneScoped annotations
 * because spring will take care of them.
 * @return set of annotations to exclude from handlesType
 */
private Set<Class<? extends Annotation>> annotationsToExclude() {
	Set<Class<? extends Annotation>> result = new HashSet<>();
	if (this.jsfAnnotatedClassFactoryConfiguration.isExcludeScopedAnnotations()) {
		result.add(ViewScoped.class);
		result.add(SessionScoped.class);
		result.add(RequestScoped.class);
		result.add(NoneScoped.class);
	}
	return result;
}
 
開發者ID:joinfaces,項目名稱:joinfaces,代碼行數:16,代碼來源:JsfClassFactory.java


注:本文中的javax.faces.bean.SessionScoped類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。