Package org.springframework.context.annotation

Examples of org.springframework.context.annotation.AnnotationBeanNameGenerator


  }

  @Test
  public void withBeanNameGenerator() {
    AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
    ctx.setBeanNameGenerator(new AnnotationBeanNameGenerator() {
      @Override
      public String generateBeanName(BeanDefinition definition,
          BeanDefinitionRegistry registry) {
        return "custom-" + super.generateBeanName(definition, registry);
      }
View Full Code Here


  }

  @Test
  public void registerOuterConfig_withBeanNameGenerator() {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
    ctx.setBeanNameGenerator(new AnnotationBeanNameGenerator() {
      @Override
      public String generateBeanName(
          BeanDefinition definition, BeanDefinitionRegistry registry) {
        return "custom-" + super.generateBeanName(definition, registry);
      }
View Full Code Here

    this.registry = registry;
    this.container = container;
    addIncludeFilter(new ComponentTypeFilter());

    setScopeMetadataResolver(new VRaptorScopeResolver());
    setBeanNameGenerator(new UniqueBeanNameGenerator(new AnnotationBeanNameGenerator()));
  }
View Full Code Here

    this.registry = registry;
    this.container = container;
    addIncludeFilter(new ComponentTypeFilter());

    setScopeMetadataResolver(new VRaptorScopeResolver());
    setBeanNameGenerator(new UniqueBeanNameGenerator(new AnnotationBeanNameGenerator()));
  }
View Full Code Here

    this.registry = registry;
    this.container = container;
    addIncludeFilter(new ComponentTypeFilter());

    setScopeMetadataResolver(new VRaptorScopeResolver());
    setBeanNameGenerator(new UniqueBeanNameGenerator(new AnnotationBeanNameGenerator()));
  }
View Full Code Here

    //    }
    //    ScopeMetadata scopeMetadata = this.scopeMetadataResolver.resolveScopeMetadata(abd);
    //    abd.setScope(scopeMetadata.getScopeName());
    abd.setScope(BeanDefinition.SCOPE_SINGLETON);

    AnnotationBeanNameGenerator nameGenerator = new AnnotationBeanNameGenerator();
    String beanName = nameGenerator.generateBeanName(abd, this.registry);
    //    AnnotationConfigUtils.processCommonDefinitionAnnotations(abd);
    //    if (qualifiers != null) {
    //      for (Class<? extends Annotation> qualifier : qualifiers) {
    //        if (Primary.class.equals(qualifier)) {
    //          abd.setPrimary(true);
View Full Code Here

TOP

Related Classes of org.springframework.context.annotation.AnnotationBeanNameGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.