Package org.springframework.context.annotation

Examples of org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register()


    if (!ObjectUtils.isEmpty(this.annotatedClasses)) {
      if (logger.isInfoEnabled()) {
        logger.info("Registering annotated classes: [" +
            StringUtils.arrayToCommaDelimitedString(this.annotatedClasses) + "]");
      }
      reader.register(this.annotatedClasses);
    }

    if (!ObjectUtils.isEmpty(this.basePackages)) {
      if (logger.isInfoEnabled()) {
        logger.info("Scanning base packages: [" +
View Full Code Here


        try {
          Class<?> clazz = getClassLoader().loadClass(configLocation);
          if (logger.isInfoEnabled()) {
            logger.info("Successfully resolved class for [" + configLocation + "]");
          }
          reader.register(clazz);
        }
        catch (ClassNotFoundException ex) {
          if (logger.isDebugEnabled()) {
            logger.debug("Could not load class for config location [" + configLocation +
                "] - trying package scan. " + ex);
View Full Code Here

    if (!ObjectUtils.isEmpty(this.annotatedClasses)) {
      if (logger.isInfoEnabled()) {
        logger.info("Registering annotated classes: [" +
            StringUtils.arrayToCommaDelimitedString(this.annotatedClasses) + "]");
      }
      reader.register(this.annotatedClasses);
    }

    if (!ObjectUtils.isEmpty(this.basePackages)) {
      if (logger.isInfoEnabled()) {
        logger.info("Scanning base packages: [" +
View Full Code Here

        try {
          Class<?> clazz = getClassLoader().loadClass(configLocation);
          if (logger.isInfoEnabled()) {
            logger.info("Successfully resolved class for [" + configLocation + "]");
          }
          reader.register(clazz);
        }
        catch (ClassNotFoundException ex) {
          if (logger.isDebugEnabled()) {
            logger.debug("Could not load class for config location [" + configLocation +
                "] - trying package scan. " + ex);
View Full Code Here

    };
    System.setSecurityManager(securityManager);

    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AnnotatedBeanDefinitionReader reader = new AnnotatedBeanDefinitionReader(bf);
    reader.register(C1.class);
    assertThat(bf.containsBean("c1"), is(true));
  }

  @Test
  public void securityManagerDisallowsAccessToSystemEnvironmentAndDisallowsAccessToIndividualKey() {
View Full Code Here

    };
    System.setSecurityManager(securityManager);

    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AnnotatedBeanDefinitionReader reader = new AnnotatedBeanDefinitionReader(bf);
    reader.register(C1.class);
    assertThat(bf.containsBean("c1"), is(false));
  }


  @Component("c1")
View Full Code Here

    if (!this.annotatedClasses.isEmpty()) {
      if (logger.isInfoEnabled()) {
        logger.info("Registering annotated classes: [" +
            StringUtils.collectionToCommaDelimitedString(this.annotatedClasses) + "]");
      }
      reader.register(this.annotatedClasses.toArray(new Class<?>[this.annotatedClasses.size()]));
    }

    if (!this.basePackages.isEmpty()) {
      if (logger.isInfoEnabled()) {
        logger.info("Scanning base packages: [" +
View Full Code Here

        try {
          Class<?> clazz = getClassLoader().loadClass(configLocation);
          if (logger.isInfoEnabled()) {
            logger.info("Successfully resolved class for [" + configLocation + "]");
          }
          reader.register(clazz);
        }
        catch (ClassNotFoundException ex) {
          if (logger.isDebugEnabled()) {
            logger.debug("Could not load class for config location [" + configLocation +
                "] - trying package scan. " + ex);
View Full Code Here

        try {
          Class<?> clazz = getClassLoader().loadClass(configLocation);
          if (logger.isInfoEnabled()) {
            logger.info("Successfully resolved class for [" + configLocation + "]");
          }
          reader.register(clazz);
        }
        catch (ClassNotFoundException ex) {
          if (logger.isDebugEnabled()) {
            logger.debug("Could not load class for config location [" + configLocation +
                "] - trying package scan. " + ex);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.