当前位置: 首页>>代码示例>>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;未经允许,请勿转载。