Package com.foreach.across.core.context.configurer

Examples of com.foreach.across.core.context.configurer.AnnotatedClassConfigurer


   * @param moduleName           Unique name of the module in the context.
   * @param configurationClasses Annotated class instances.
   * @return True if the module was present.
   */
  public boolean extendModule( String moduleName, Class... configurationClasses ) {
    return extendModule( moduleName, new AnnotatedClassConfigurer( configurationClasses ) );
  }
View Full Code Here


      return "";
    }

    @Override
    protected void registerDefaultApplicationContextConfigurers( Set<ApplicationContextConfigurer> contextConfigurers ) {
      contextConfigurers.add( new AnnotatedClassConfigurer( ModuleConfig.class ) );
    }
View Full Code Here

      ScannedBeanModule2.CONSTRUCTION_COUNTER.set( 0 );

      AcrossContext context = new AcrossContext( applicationContext );
      context.setDataSource( acrossDataSource() );
      context.setInstallerAction( InstallerAction.EXECUTE );
      context.addApplicationContextConfigurer( new AnnotatedClassConfigurer( CustomPropertyConfig.class ),
                                               ConfigurerScope.CONTEXT_AND_MODULES );

      context.addModule( testModule1() );
      context.addModule( testModule2() );
View Full Code Here

    AcrossContext across = new AcrossContext();
    across.setInstallerAction( InstallerAction.DISABLED );
    across.setDataSource( mock( DataSource.class ) );

    AcrossModule moduleOne = new EmptyAcrossModule( "moduleOne" );
    moduleOne.addApplicationContextConfigurer( new AnnotatedClassConfigurer( Config.class ) );

    AcrossModule moduleTwo = new EmptyAcrossModule( "moduleTwo" );
    moduleTwo.addApplicationContextConfigurer( new AnnotatedClassConfigurer( Config.class ) );

    across.addModule( moduleOne );
    across.addModule( moduleTwo );

    across.bootstrap();
View Full Code Here

    AcrossContext across = new AcrossContext( parent );
    across.setInstallerAction( InstallerAction.DISABLED );
    across.setDataSource( mock( DataSource.class ) );

    AcrossModule moduleOne = new EmptyAcrossModule( "moduleOne" );
    moduleOne.addApplicationContextConfigurer( new AnnotatedClassConfigurer( Config.class ) );

    AcrossModule moduleTwo = new EmptyAcrossModule( "moduleTwo" );
    moduleTwo.addApplicationContextConfigurer( new AnnotatedClassConfigurer( Config.class ) );

    across.addModule( moduleOne );
    across.addModule( moduleTwo );

    across.bootstrap();
View Full Code Here

    // AcrossContext configuration is bean in the parent and should be destroyed
    ( (DefaultListableBeanFactory) parent.getBeanFactory() ).registerDisposableBean( "acrossContext", across );

    AcrossModule moduleOne = new EmptyAcrossModule( "moduleOne" );
    moduleOne.addApplicationContextConfigurer( new AnnotatedClassConfigurer( Config.class ) );

    AcrossModule moduleTwo = new EmptyAcrossModule( "moduleTwo" );
    moduleTwo.addApplicationContextConfigurer( new AnnotatedClassConfigurer( Config.class ) );

    across.addModule( moduleOne );
    across.addModule( moduleTwo );

    across.bootstrap();
View Full Code Here

      return null;
    }

    @Override
    protected void registerDefaultApplicationContextConfigurers( Set<ApplicationContextConfigurer> contextConfigurers ) {
      contextConfigurers.add( new AnnotatedClassConfigurer( MyBeanConfig.class ) );
    }
View Full Code Here

   * @param contextConfigurers Set of existing configurers to add to.
   */
  @Override
  protected void registerDefaultApplicationContextConfigurers( Set<ApplicationContextConfigurer> contextConfigurers ) {
    contextConfigurers.add(
        new AnnotatedClassConfigurer(
            AcrossWebConfig.class,
            AcrossWebTemplateConfig.class,
            AcrossWebDefaultMvcConfiguration.class,
            MultipartResolverConfiguration.class
        )
View Full Code Here

  @Override
  public void prepareForBootstrap( ModuleBootstrapConfig currentModule,
                                   AcrossBootstrapConfig contextConfig ) {
    if ( ArrayUtils.contains( supportedViews, AcrossWebViewSupport.JSP ) ) {
      currentModule.addApplicationContextConfigurer(
          new AnnotatedClassConfigurer( JstlViewSupportConfiguration.class ) );
    }
    if ( ArrayUtils.contains( supportedViews, AcrossWebViewSupport.THYMELEAF ) ) {
      currentModule.addApplicationContextConfigurer(
          new AnnotatedClassConfigurer( ThymeleafViewSupportConfiguration.class ) );
    }
  }
View Full Code Here

    context.shutdown();
  }

  @Test
  public void singleCondition() {
    context.addApplicationContextConfigurer( new AnnotatedClassConfigurer( ConditionConfig.class ),
                                             ConfigurerScope.MODULES_ONLY );
    context.addModule( moduleOne );
    context.addModule( moduleTwo );

    context.bootstrap();
View Full Code Here

TOP

Related Classes of com.foreach.across.core.context.configurer.AnnotatedClassConfigurer

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.