org.springframework.boot.autoconfigure.AutoConfigurationPackages Java Examples

The following examples show how to use org.springframework.boot.autoconfigure.AutoConfigurationPackages. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MapperAutoConfiguration.java    From mapper-boot-starter with MIT License 6 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {

    logger.debug("Searching for mappers annotated with @Mapper");

    ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);
    scanner.setMapperProperties(environment);
    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }

        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (logger.isDebugEnabled()) {
            for (String pkg : packages) {
                logger.debug("Using auto-configuration base package '{}'", pkg);
            }
        }

        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #2
Source File: AbstractFunctionExecutionAutoConfigurationExtension.java    From spring-boot-data-geode with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unused")
@Override
protected AbstractFunctionExecutionConfigurationSource newAnnotationBasedFunctionExecutionConfigurationSource(
		AnnotationMetadata annotationMetadata) {

	StandardAnnotationMetadata metadata =
		new StandardAnnotationMetadata(getConfiguration(), true);

	return new AnnotationFunctionExecutionConfigurationSource(metadata) {

		@Override
		public Iterable<String> getBasePackages() {
			return AutoConfigurationPackages.get(getBeanFactory());
		}
	};
}
 
Example #3
Source File: LocMybatisAutoConfiguration.java    From loc-framework with MIT License 6 votes vote down vote up
private void createClassPathMapperScanner(BeanDefinitionRegistry registry, String prefixName) {
  ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);

  try {
    if (this.resourceLoader != null) {
      scanner.setResourceLoader(this.resourceLoader);
    }

    List<String> packages = AutoConfigurationPackages.get(beanFactory);
    packages.forEach(pkg -> log.info("Using auto-configuration base package '{}'", pkg));

    scanner.setAnnotationClass(Mapper.class);
    scanner.setSqlSessionFactoryBeanName(prefixName + "SessionFactory");
    scanner.registerFilters();
    scanner.doScan(StringUtils.toStringArray(packages));
  } catch (IllegalStateException ex) {
    log.info("Could not determine auto-configuration package", ex);
  }
}
 
Example #4
Source File: MapperAutoConfiguration.java    From mapper-boot-starter with MIT License 6 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {

    logger.debug("Searching for mappers annotated with @Mapper");

    ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);
    scanner.setMapperProperties(environment);
    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }

        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (logger.isDebugEnabled()) {
            for (String pkg : packages) {
                logger.debug("Using auto-configuration base package '{}'", pkg);
            }
        }

        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #5
Source File: MapperScannerRegistryConfigurer.java    From AsyncDao with MIT License 6 votes vote down vote up
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry beanDefinitionRegistry) throws BeansException {
    log.debug("Searching for mappers annotated with @Mapper");

    ClassPathMapperScanner scanner = new ClassPathMapperScanner(beanDefinitionRegistry);
    try {
        if (this.applicationContext != null) {
            scanner.setResourceLoader(this.applicationContext);
        }
        List<String> packages = AutoConfigurationPackages.get(this.applicationContext);
        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        log.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #6
Source File: MapperScannerConfigurer.java    From AsyncDao with MIT License 6 votes vote down vote up
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
    log.debug("Searching for mappers annotated with @Mapper");
    ClassPathMapperScanner scanner = new ClassPathMapperScanner((BeanDefinitionRegistry) beanFactory);
    try {
        if (this.applicationContext != null) {
            scanner.setResourceLoader(applicationContext);
        }
        List<String> packages = AutoConfigurationPackages.get(beanFactory);
        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        log.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #7
Source File: AutoConfiguredMapperScannerRegistrar.java    From AsyncDao with MIT License 6 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
    log.debug("Searching for mappers annotated with @Mapper");
    ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);
    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }
        String[] packages;
        Environment env = beanFactory.getBean(Environment.class);
        String basePackages = env.getProperty("async.dao.basePackages");
        if (StringUtils.isEmpty(basePackages)) {
            packages = StringUtils.toStringArray(AutoConfigurationPackages.get(this.beanFactory));
        } else {
            packages = basePackages.split(",");
        }
        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(packages);
    } catch (IllegalStateException ex) {
        log.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #8
Source File: MyBatisPlusAutoConfiguration.java    From mybatis-plus-sharding-jdbc-spring-boot-starter with Apache License 2.0 6 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {

    logger.debug("Searching for mappers annotated with @Mapper");

    ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);

    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }

        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (logger.isDebugEnabled()) {
            for (String pkg : packages) {
                logger.debug("Using auto-configuration base package '" + pkg + "'");
            }
        }

        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled." + ex);
    }
}
 
Example #9
Source File: GRpcClientRegister.java    From faster-framework-project with Apache License 2.0 6 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
    AnnotationAttributes annotationAttributes = AnnotationAttributes.fromMap(importingClassMetadata.getAnnotationAttributes(GRpcClientScan.class.getCanonicalName()));
    if (annotationAttributes == null) {
        log.warn("GrpcScan was not found.Please check your configuration.");
        return;
    }
    ClassPathGRpcServiceScanner classPathGrpcServiceScanner = new ClassPathGRpcServiceScanner(registry, beanFactory);
    classPathGrpcServiceScanner.setResourceLoader(this.resourceLoader);
    classPathGrpcServiceScanner.addIncludeFilter(new AnnotationTypeFilter(GRpcService.class));
    List<String> basePackages = AutoConfigurationPackages.get(this.beanFactory);
    for (String pkg : annotationAttributes.getStringArray("basePackages")) {
        if (StringUtils.hasText(pkg)) {
            basePackages.add(pkg);
        }
    }
    classPathGrpcServiceScanner.doScan(StringUtils.toStringArray(basePackages));
}
 
Example #10
Source File: GRpcApiRegister.java    From faster-framework-project with Apache License 2.0 6 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
    AnnotationAttributes annotationAttributes = AnnotationAttributes.fromMap(importingClassMetadata.getAnnotationAttributes(GRpcServerScan.class.getCanonicalName()));
    if (annotationAttributes == null) {
        log.warn("GrpcScan was not found.Please check your configuration.");
        return;
    }
    ClassPathBeanDefinitionScanner classPathGrpcApiScanner = new ClassPathBeanDefinitionScanner(registry, false);
    classPathGrpcApiScanner.setResourceLoader(this.resourceLoader);
    classPathGrpcApiScanner.addIncludeFilter(new AnnotationTypeFilter(GRpcApi.class));
    List<String> basePackages = AutoConfigurationPackages.get(this.beanFactory);
    for (String pkg : annotationAttributes.getStringArray("basePackages")) {
        if (StringUtils.hasText(pkg)) {
            basePackages.add(pkg);
        }
    }
    classPathGrpcApiScanner.scan(StringUtils.toStringArray(basePackages));
}
 
Example #11
Source File: ApiBootMyBatisEnhanceAutoConfiguration.java    From beihu-boot with Apache License 2.0 5 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {

    logger.debug("Searching for mappers based with EnhanceMapper.class");
    // 重写扫描实现类
    // 将扫描到的每一个类
    EnhanceClassPathMapperScanner scanner = new EnhanceClassPathMapperScanner(registry);
    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }

        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (logger.isDebugEnabled()) {
            for (String pkg : packages) {
                logger.debug("Using auto-configuration base package '{}'", pkg);
            }
        }
        // 通过标记的父接口扫描
        scanner.setMarkerInterface(EnhanceMapper.class);
        // 通过注解形式扫描
        //scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #12
Source File: MapperAutoConfiguration.java    From Mapper with MIT License 5 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {

    logger.debug("Searching for mappers annotated with @Mapper");

    ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);
    scanner.setMapperProperties(environment);
    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }
        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (logger.isDebugEnabled()) {
            for (String pkg : packages) {
                logger.debug("Using auto-configuration base package '{}'", pkg);
            }
        }
        BaseProperties properties = SpringBootBindUtil.bind(environment, BaseProperties.class, BaseProperties.MYBATIS_PREFIX);
        if(properties != null && properties.getBasePackages() != null && properties.getBasePackages().length > 0){
            packages.addAll(Arrays.asList(properties.getBasePackages()));
        } else {
            //设置了包名的情况下,不需要指定该注解
            scanner.setAnnotationClass(Mapper.class);
        }
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #13
Source File: ClassCandidateScanner.java    From wicket-spring-boot with Apache License 2.0 5 votes vote down vote up
private static Collection<String> getMappingBasePackages(BeanFactory beanFactory) {
	try {
		return AutoConfigurationPackages.get(beanFactory);
	}
	catch (IllegalStateException ex) {
		// no auto-configuration package registered yet
		return Collections.emptyList();
	}
}
 
Example #14
Source File: AnnotationsScanner.java    From mdw with Apache License 2.0 5 votes vote down vote up
/**
 * Source files under src/main/java are scanned for @Activity annotations.
 */
public void findSpringAnnotatedClasses() {
    List<String> scanPackages = AutoConfigurationPackages.get(beanFactory);
    ClassPathScanningCandidateComponentProvider provider = createScannerComponentProvider();
    for (String scanPackage : scanPackages) {
        for (BeanDefinition beanDef : provider.findCandidateComponents(scanPackage)) {
            beanDef.setScope(BeanDefinition.SCOPE_PROTOTYPE);
            addImplementor(beanDef);
        }
    }
}
 
Example #15
Source File: FunctionalInstallerImportRegistrars.java    From spring-init with Apache License 2.0 5 votes vote down vote up
private Set<Imported> prioritize(Set<Imported> registrars) {
	Set<Imported> result = new LinkedHashSet<>();
	for (Imported imported : registrars) {
		if (imported.getType() != null
				&& imported.getType().getName().startsWith(AutoConfigurationPackages.class.getName())) {
			result.add(imported);
		}
	}
	result.addAll(registrars);
	return result;
}
 
Example #16
Source File: RpcExporterRegister.java    From brpc-java with Apache License 2.0 5 votes vote down vote up
private Collection<BeanDefinition> getCandidates(ResourceLoader resourceLoader) {
    ClassPathScanningCandidateComponentProvider scanner =
            new ClassPathScanningCandidateComponentProvider(false, environment);

    scanner.addIncludeFilter(new AnnotationTypeFilter(RpcExporter.class));
    scanner.setResourceLoader(resourceLoader);
    return AutoConfigurationPackages.get(beanFactory).stream()
            .flatMap(basePackage -> scanner.findCandidateComponents(basePackage).stream())
            .collect(Collectors.toSet());
}
 
Example #17
Source File: ApiBootSwaggerAutoConfiguration.java    From api-boot with Apache License 2.0 5 votes vote down vote up
/**
 * 配置swagger基本信息
 * - BasePackage
 * 默认使用SpringBoot项目扫描bean根目录
 * 如果存在配置时则使用SwaggerProperties.basePackage作为扫描根目录
 *
 * @return Docket实例
 */
@Bean
public Docket docket() {
    String basePackage = swaggerProperties.getBasePackage();
    if (StringUtils.isEmpty(basePackage)) {
        basePackage = AutoConfigurationPackages.get(beanFactory).get(0);
    }
    return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).securitySchemes(Collections.singletonList(apiKey())).securityContexts(Collections.singletonList(securityContext())).select().apis(RequestHandlerSelectors.basePackage(basePackage)).paths(PathSelectors.any()).build();
}
 
Example #18
Source File: ApiBootMyBatisEnhanceAutoConfiguration.java    From api-boot with Apache License 2.0 5 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {

    logger.debug("Searching for mappers based with EnhanceMapper.class");
    // 重写扫描实现类
    // 将扫描到的每一个类
    EnhanceClassPathMapperScanner scanner = new EnhanceClassPathMapperScanner(registry);
    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }

        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (logger.isDebugEnabled()) {
            for (String pkg : packages) {
                logger.debug("Using auto-configuration base package '{}'", pkg);
            }
        }
        // 通过标记的父接口扫描
        scanner.setMarkerInterface(EnhanceMapper.class);
        // 通过注解形式扫描
        //scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException ex) {
        logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex);
    }
}
 
Example #19
Source File: HttpMessageConverterAutoConfiguration.java    From api-boot with Apache License 2.0 5 votes vote down vote up
/**
 * http message converter fastjson实现实例
 * 通过fastjson方式进行格式化返回json字符串
 *
 * @return http message converter
 */
@Bean
@ConditionalOnMissingBean
HttpMessageConverters fastJsonHttpMessageConverters() {
    FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
    //创建fastJson配置实体类
    FastJsonConfig fastJsonConfig = new FastJsonConfig();
    fastJsonConfig.setSerializerFeatures(
            SerializerFeature.DisableCircularReferenceDetect,
            SerializerFeature.WriteMapNullValue,
            SerializerFeature.WriteNullListAsEmpty,
            SerializerFeature.WriteNullStringAsEmpty,
            SerializerFeature.WriteNullNumberAsZero,
            SerializerFeature.WriteDateUseDateFormat,
            SerializerFeature.WriteNullBooleanAsFalse
    );

    // get customer define value filters
    List<String> packages = AutoConfigurationPackages.get(beanFactory);
    // get plugin define value filters
    packages.addAll(Arrays.asList(VALUE_FILTER_PACKAGE));

    fastJsonConfig.setSerializeFilters(getDefineFilters(packages));

    fastConverter.setFastJsonConfig(fastJsonConfig);
    return new HttpMessageConverters(fastConverter);
}
 
Example #20
Source File: MybatisPlusAutoConfig.java    From seata-samples with Apache License 2.0 5 votes vote down vote up
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
    MybatisPlusAutoConfig.logger.debug("Searching for mappers annotated with @Mapper");
    ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);

    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }

        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (MybatisPlusAutoConfig.logger.isDebugEnabled()) {
            Iterator iterator = packages.iterator();

            while(iterator.hasNext()) {
                String pkg = (String)iterator.next();
                MybatisPlusAutoConfig.logger.debug("Using auto-configuration base package '" + pkg + "'");
            }
        }

        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException var7) {
        MybatisPlusAutoConfig.logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled." + var7);
    }

}
 
Example #21
Source File: MybatisPlusAutoConfig.java    From seata-samples with Apache License 2.0 5 votes vote down vote up
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
    MybatisPlusAutoConfig.logger.debug("Searching for mappers annotated with @Mapper");
    ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry);

    try {
        if (this.resourceLoader != null) {
            scanner.setResourceLoader(this.resourceLoader);
        }

        List<String> packages = AutoConfigurationPackages.get(this.beanFactory);
        if (MybatisPlusAutoConfig.logger.isDebugEnabled()) {
            Iterator iterator = packages.iterator();

            while(iterator.hasNext()) {
                String pkg = (String)iterator.next();
                MybatisPlusAutoConfig.logger.debug("Using auto-configuration base package '" + pkg + "'");
            }
        }

        scanner.setAnnotationClass(Mapper.class);
        scanner.registerFilters();
        scanner.doScan(StringUtils.toStringArray(packages));
    } catch (IllegalStateException var7) {
        MybatisPlusAutoConfig.logger.debug("Could not determine auto-configuration package, automatic mapper scanning disabled." + var7);
    }

}
 
Example #22
Source File: OpenAPIBuilder.java    From springdoc-openapi with Apache License 2.0 5 votes vote down vote up
/**
 * Gets open api definition.
 *
 * @return the open api definition
 */
private Optional<OpenAPIDefinition> getOpenAPIDefinition() {
	// Look for OpenAPIDefinition in a spring managed bean
	Map<String, Object> openAPIDefinitionMap = context.getBeansWithAnnotation(OpenAPIDefinition.class);
	OpenAPIDefinition apiDef = null;
	if (openAPIDefinitionMap.size() > 1)
		LOGGER.warn(
				"found more than one OpenAPIDefinition class. springdoc-openapi will be using the first one found.");
	if (openAPIDefinitionMap.size() > 0) {
		Map.Entry<String, Object> entry = openAPIDefinitionMap.entrySet().iterator().next();
		Class<?> objClz = entry.getValue().getClass();
		apiDef = AnnotatedElementUtils.findMergedAnnotation(objClz, OpenAPIDefinition.class);
	}

	// Look for OpenAPIDefinition in the spring classpath
	else {
		ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(
				false);
		scanner.addIncludeFilter(new AnnotationTypeFilter(OpenAPIDefinition.class));
		if (AutoConfigurationPackages.has(context)) {
			List<String> packagesToScan = AutoConfigurationPackages.get(context);
			apiDef = getApiDefClass(scanner, packagesToScan);
		}

	}
	return Optional.ofNullable(apiDef);
}
 
Example #23
Source File: JobNodeCommandLineRunnerConfiguration.java    From spring-boot-starter-micro-job with Apache License 2.0 5 votes vote down vote up
/**
 * 开启上报节点触发器列表线程
 */
private void startHeartSync() {
    // 使用配置文件配置的路径
    String jobBasePackage = jobNodeProperties.getJobBasePackage();
    // 如果并未配置,则使用springboot默认扫描的package
    if (StringUtils.isEmpty(jobBasePackage)) {
        jobBasePackage = AutoConfigurationPackages.get(beanFactory).get(0);
    }
    // 开启心跳检查,每隔5秒执行同步一次
    JobThread.scheduleWithFixedDelay(new HeartSyncRunnable(heartSyncService, jobNodeProperties, jobBasePackage), jobNodeProperties.getSendHeartInitialDelay(), jobNodeProperties.getSendHeartSyncTime());
}
 
Example #24
Source File: TestAutoConfigurationPackageRegistrar.java    From sdn-rx with Apache License 2.0 5 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata metadata,
	BeanDefinitionRegistry registry) {
	AnnotationAttributes attributes = AnnotationAttributes
		.fromMap(metadata.getAnnotationAttributes(
			TestAutoConfigurationPackage.class.getName(), true));
	AutoConfigurationPackages.register(registry,
		ClassUtils.getPackageName(attributes.getString("value")));
}
 
Example #25
Source File: AbstractRegister.java    From brpc-java with Apache License 2.0 4 votes vote down vote up
protected Collection<String> getBasePackages() {
    return AutoConfigurationPackages.get(beanFactory);
}
 
Example #26
Source File: ModuleBTest.java    From moduliths with Apache License 2.0 4 votes vote down vote up
@Test // #4
void tweaksAutoConfigurationPackageToModulePackage() {

	assertThat(AutoConfigurationPackages.get(context)) //
			.containsExactly(getClass().getPackage().getName());
}
 
Example #27
Source File: DomainEventsAutoConfiguration.java    From spring-domain-events with Apache License 2.0 4 votes vote down vote up
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
	AutoConfigurationPackages.register(registry, EventPublication.class.getPackage().getName());
}
 
Example #28
Source File: MongoContentAutoConfigureRegistrar.java    From spring-content with Apache License 2.0 4 votes vote down vote up
protected String[] getBasePackages() {
	return AutoConfigurationPackages.get(this.getBeanFactory())
			.toArray(new String[] {});
}
 
Example #29
Source File: JpaContentAutoConfigureRegistrar.java    From spring-content with Apache License 2.0 4 votes vote down vote up
protected String[] getBasePackages() {
	return AutoConfigurationPackages.get(this.getBeanFactory())
			.toArray(new String[] {});
}
 
Example #30
Source File: FilesystemContentAutoConfigureRegistrar.java    From spring-content with Apache License 2.0 4 votes vote down vote up
protected String[] getBasePackages() {
	return AutoConfigurationPackages.get(this.getBeanFactory())
			.toArray(new String[] {});
}