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


Java Filter類代碼示例

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


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

示例1: getFilters

import org.springframework.context.annotation.ComponentScan.Filter; //導入依賴的package包/類
@Override
protected Filter[] getFilters(final FilterType type) {
    switch (type) {
        case INCLUDE:
            return this.annotation.includeFilters();
        case EXCLUDE:
            return this.annotation.excludeFilters();
        default:
            throw new IllegalStateException("Unsupported type " + type);
    }
}
 
開發者ID:michael-simons,項目名稱:datamongotest-autoconfigure-spring-boot-DEPRECATED-,代碼行數:12,代碼來源:DataMongoTypeExcludeFilter.java

示例2: getFilters

import org.springframework.context.annotation.ComponentScan.Filter; //導入依賴的package包/類
@Override
protected Filter[] getFilters(FilterType type) {
	switch (type) {
	case INCLUDE:
		return this.annotation.includeFilters();
	case EXCLUDE:
		return this.annotation.excludeFilters();
	}
	throw new IllegalStateException("Unsupported type " + type);
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:11,代碼來源:WebMvcTypeExcludeFilter.java

示例3: createTypeFilters

import org.springframework.context.annotation.ComponentScan.Filter; //導入依賴的package包/類
private List<TypeFilter> createTypeFilters(Filter[] filters) {
	List<TypeFilter> typeFilters = new ArrayList<TypeFilter>();
	for (Filter filter : filters) {
		for (Class<?> filterClass : filter.classes()) {
			typeFilters.add(createTypeFilter(filter.type(), filterClass));
		}
		for (String pattern : filter.pattern()) {
			typeFilters.add(createTypeFilter(filter.type(), pattern));
		}
	}
	return Collections.unmodifiableList(typeFilters);
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:13,代碼來源:FilterAnnotations.java

示例4: getFilters

import org.springframework.context.annotation.ComponentScan.Filter; //導入依賴的package包/類
@Override
protected Filter[] getFilters(FilterType type) {
  switch (type) {
    case INCLUDE:
      return this.annotation.includeFilters();
    case EXCLUDE:
      return this.annotation.excludeFilters();
  }
  throw new IllegalStateException("Unsupported type " + type);
}
 
開發者ID:DISID,項目名稱:springlets,代碼行數:11,代碼來源:SpringletsWebMvcExcludeFilter.java

示例5: setUp

import org.springframework.context.annotation.ComponentScan.Filter; //導入依賴的package包/類
@Before
public void setUp() {
    ComponentContext.initComponentsLifeCycle();
    IAMGroupVO group = new IAMGroupVO("group1", "my first group");
    Mockito.when(_aclGroupDao.persist(Mockito.any(IAMGroupVO.class))).thenReturn(group);
    List<IAMGroupVO> groups = new ArrayList<IAMGroupVO>();
    groups.add(group);
    when(_aclGroupDao.search(Mockito.any(SearchCriteria.class), Mockito.any(com.cloud.utils.db.Filter.class)))
            .thenReturn(groups);

    IAMPolicyVO policy = new IAMPolicyVO("policy1", "my first policy");
    Mockito.when(_aclPolicyDao.persist(Mockito.any(IAMPolicyVO.class))).thenReturn(policy);

}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:15,代碼來源:IAMServiceUnitTest.java

示例6: FilterAnnotations

import org.springframework.context.annotation.ComponentScan.Filter; //導入依賴的package包/類
public FilterAnnotations(ClassLoader classLoader, Filter[] filters) {
	Assert.notNull(filters, "Filters must not be null");
	this.classLoader = classLoader;
	this.filters = createTypeFilters(filters);
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:6,代碼來源:FilterAnnotations.java

示例7: getFilters

import org.springframework.context.annotation.ComponentScan.Filter; //導入依賴的package包/類
protected abstract Filter[] getFilters(FilterType type); 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:2,代碼來源:AnnotationCustomizableTypeExcludeFilter.java


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