当前位置: 首页>>代码示例>>Java>>正文


Java SpringComponentInjector类代码示例

本文整理汇总了Java中org.apache.wicket.spring.injection.annot.SpringComponentInjector的典型用法代码示例。如果您正苦于以下问题:Java SpringComponentInjector类的具体用法?Java SpringComponentInjector怎么用?Java SpringComponentInjector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SpringComponentInjector类属于org.apache.wicket.spring.injection.annot包,在下文中一共展示了SpringComponentInjector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Before
public void setUp() {
    applicationContextMock = new ApplicationContextMock();
    WicketApplication wicketApp = new WicketApplication();
    wicketApp.getComponentInstantiationListeners()
    .add(new SpringComponentInjector(wicketApp,applicationContextMock));
    tester = new WicketTester(wicketApp);

    applicationContextMock.putBean(new PersonRepository(){
        @Override
        public List<Person> findAllPersons() {
          return Collections.emptyList();
        }
    });

}
 
开发者ID:sparsick,项目名称:ansible-docker-talk,代码行数:17,代码来源:TestHomePage.java

示例2: registerResourceBundles

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
private void registerResourceBundles() {
    // this listener will inject any spring beans that need to be autowired
    getComponentInstantiationListeners().add(new SpringComponentInjector(this, applicationContext));
    // register the resource of field names (used by eu.clarin.cmdi.vlo.wicket.componentsSolrFieldNameLabel)
    getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("fieldNames"));
    // register the resource of resource type names and class properties
    getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("resourceTypes"));
    // register the resource of license URLs (used in RecordLicenseInfoPanel)
    getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("licenseUrls"));
    // register the resource of application properties (version information filtered at build time)
    getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("application"));
    // register JavaScript bundle (combines  JavaScript source in a single resource to decrease number of client requests)
    getResourceBundles().addJavaScriptBundle(VloBasePage.class, "vlo-js",
            JavaScriptResources.getVloFrontJS(),
            JavaScriptResources.getVloHeaderJS(),
            JavaScriptResources.getSyntaxHelpJS(),
            JavaScriptResources.getVloFacetsJS(),
            JavaScriptResources.getJQueryWatermarkJS()
    );
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:21,代码来源:VloWicketApplication.java

示例3: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
public void init() {
    super.init();
    getMarkupSettings().setStripWicketTags(true);
    getMarkupSettings().setStripComments(true);
    getMarkupSettings().setDefaultMarkupEncoding(StandardCharsets.UTF_8.name());
    setHeaderResponseDecorator(r -> new JavaScriptFilteredIntoFooterHeaderResponse(r, SingularTemplate.JAVASCRIPT_CONTAINER));
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    new AnnotatedMountScanner().scanPackage("org.opensingular.studio").mount(this);
    List<IStringResourceLoader> stringResourceLoaders = getResourceSettings().getStringResourceLoaders();
    stringResourceLoaders.add(0, new ClassStringResourceLoader(appConfig.getClass()));
    getComponentOnConfigureListeners().add(component -> {
        boolean outputId = !component.getRenderBodyOnly();
        component.setOutputMarkupId(outputId).setOutputMarkupPlaceholderTag(outputId);
    });
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:17,代码来源:ServerStudioApplication.java

示例4: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
/**
 * @see org.apache.wicket.Application#init()
 */
@Override
public void init()
{
	super.init();

	// TODO STEP 7b: uncomment to enable injection of fortress spring beans:
	getComponentInstantiationListeners().add(new SpringComponentInjector(this));

	// Catch runtime exceptions this way:
	getRequestCycleListeners().add( new AbstractRequestCycleListener()
	{
		@Override
		public IRequestHandler onException( RequestCycle cycle, Exception e )
		{
			return new RenderPageRequestHandler( new PageProvider( new ErrorPage( e ) ) );
		}
	} );
	getMarkupSettings().setStripWicketTags(true);

	getRequestCycleSettings().setRenderStrategy( RequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
}
 
开发者ID:shawnmckinney,项目名称:fortress-saml-demo,代码行数:25,代码来源:WicketApplication.java

示例5: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
protected void init() {
    getComponentInstantiationListeners().add(
            new SpringComponentInjector(this));

    getResourceSettings().setThrowExceptionOnMissingResource(true);

    getSecuritySettings().
            setAuthorizationStrategy(new RoleAuthorizationStrategy(this));
    getSecuritySettings().
            setUnauthorizedComponentInstantiationListener(this);

    getMarkupSettings().setStripWicketTags(true);

    getRequestCycleListeners().add(new SyncopeRequestCycleListener());
}
 
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:17,代码来源:SyncopeApplication.java

示例6: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
public void init() {
    super.init();
    getDebugSettings().setAjaxDebugModeEnabled(false);
    getExceptionSettings().setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_EXCEPTION_PAGE);
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));

    final IBootstrapSettings bootstrapSettings = new BootstrapSettings()
            .useCdnResources(getConfigurationType() == RuntimeConfigurationType.DEPLOYMENT)
            .setThemeProvider(new SingleThemeProvider(BootswatchTheme.Cosmo));
    Bootstrap.install(this, bootstrapSettings);

    //Howler.install(this);

    mountPages();
}
 
开发者ID:lumenrobot,项目名称:lumen,代码行数:17,代码来源:MyWebApplication.java

示例7: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
public void init() {
    super.init();
    getDebugSettings().setAjaxDebugModeEnabled(false);
    getExceptionSettings().setUnexpectedExceptionDisplay(ExceptionSettings.SHOW_EXCEPTION_PAGE);
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));

    final IBootstrapSettings bootstrapSettings = new BootstrapSettings()
            .useCdnResources(getConfigurationType() == RuntimeConfigurationType.DEPLOYMENT)
            .setThemeProvider(new SingleThemeProvider(BootswatchTheme.Cosmo));
    Bootstrap.install(this, bootstrapSettings);

    //Howler.install(this);
    ((SecurePackageResourceGuard) getResourceSettings().getPackageResourceGuard()).addPattern("+*.map");

    JQueryFix1_12_1.apply(this);

    mountPages();
}
 
开发者ID:lumenrobot,项目名称:lumen,代码行数:20,代码来源:MyWebApplication.java

示例8: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
protected void init() {
	super.init();
    
	getComponentInstantiationListeners().add(new SpringComponentInjector(this, applicationContext));
	
	WicketAutoConfig.Builder builder = new WicketAutoConfig.Builder(this.getClass());
	wicketEndpointRepository.add(builder
			.withDetail("signInPages", classCandidates.getSignInPageCandidates())
			.withDetail("homePages", classCandidates.getHomePageCandidates())
			.build());
	
	for (WicketApplicationInitConfiguration configuration : configurations) {
		logger.info("init-config: " + configuration.getClass().getName());
		configuration.init(this);
	}
	
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:19,代码来源:WicketBootStandardWebApplication.java

示例9: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
protected final void init() {
    super.init();

    if (getConfigurationType() == RuntimeConfigurationType.DEVELOPMENT) {
        String path = "src/main/java";
        if (new File(path).exists()) {
            getResourceSettings().getResourceFinders().add(0, new Path(path));
        } else {
            logger.warn("No src/main/java folder found, dynamic resource reloading is not available");
        }
    }
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    getDebugSettings().setOutputMarkupContainerClassName(false);
    
    customInit();
}
 
开发者ID:payneteasy,项目名称:superfly,代码行数:18,代码来源:BaseApplication.java

示例10: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
public void init()
{
    super.init();
    getComponentInstantiationListeners().add( new SpringComponentInjector( this ) );

    // Catch runtime exceptions this way:
    getRequestCycleListeners().add( new AbstractRequestCycleListener()
    {
        @Override
        public IRequestHandler onException( RequestCycle cycle, Exception e )
        {
            return new RenderPageRequestHandler( new PageProvider( new ErrorPage( e ) ) );
        }
    } );
    getMarkupSettings().setStripWicketTags( true );
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:18,代码来源:ApplicationContext.java

示例11: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
/**
 * @see org.apache.wicket.Application#init()
 */
@Override
public void init()
{
	super.init();

	// Enable injection of fortress spring beans:
	getComponentInstantiationListeners().add(new SpringComponentInjector(this));

	// Catch runtime exceptions this way:
	getRequestCycleListeners().add( new AbstractRequestCycleListener()
	{
		@Override
		public IRequestHandler onException( RequestCycle cycle, Exception e )
		{
			return new RenderPageRequestHandler( new PageProvider( new ErrorPage( e ) ) );
		}
	} );
	getMarkupSettings().setStripWicketTags(true);
	getRequestCycleSettings().setRenderStrategy( RequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
}
 
开发者ID:shawnmckinney,项目名称:role-engineering-sample,代码行数:24,代码来源:WicketApplication.java

示例12: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
protected void init() {
    super.init();
    new AnnotatedMountScanner().scanPackage("io.github.zutherb.appstash.shop.ui.page").mount(this);
    getMarkupSettings().setStripWicketTags(true);
    getRequestCycleSettings().setRenderStrategy(
            RequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
    getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    getSecuritySettings().setAuthorizationStrategy(new SpringSecurityAuthorizationStrategy());
    getDebugSettings().setAjaxDebugModeEnabled(false);

    setJavaScriptLibrarySettings(new JavaScriptLibrarySettings());

    getRequestCycleListeners().add(new MicroserviceRequestCycleListener());
    getRequestCycleListeners().add(new DockerRequestCycleListener());
    getRequestCycleListeners().add(new BootstrapDesignRequestCycleListener());
    getRequestCycleListeners().add(new DirectBuyRequestCycleListener());
    getRequestCycleListeners().add(new CartRequestCycleListener());
}
 
开发者ID:zutherb,项目名称:AppStash,代码行数:20,代码来源:ShopApplication.java

示例13: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
/**
 * @see org.apache.wicket.Application#init()
 */
@Override
public void init()
{
	super.init();
	// add your configuration here
       getComponentInstantiationListeners().add(new SpringComponentInjector(this));

       // Catch runtime exceptions this way:
       getRequestCycleListeners().add( new AbstractRequestCycleListener()
       {
           @Override
           public IRequestHandler onException( RequestCycle cycle, Exception e )
           {
               return new RenderPageRequestHandler( new PageProvider( new ErrorPage( e ) ) );
           }
       } );

       getMarkupSettings().setStripWicketTags(true);
}
 
开发者ID:shawnmckinney,项目名称:fortressdemo2,代码行数:23,代码来源:WicketApplication.java

示例14: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
@Override
public void init() {
	super.init();
	logger.info("wicket application init");        
	getComponentInstantiationListeners().add(new SpringComponentInjector(this, applicationContext));
	getApplicationSettings().setUploadProgressUpdatesEnabled(true);
}
 
开发者ID:intuit,项目名称:karate,代码行数:8,代码来源:WicketApplication.java

示例15: init

import org.apache.wicket.spring.injection.annot.SpringComponentInjector; //导入依赖的package包/类
/**
 * @see org.apache.wicket.Application#init()
 */
@Override
public void init() {
    super.init();

    getComponentInstantiationListeners().add(new SpringComponentInjector(this));

}
 
开发者ID:sparsick,项目名称:ansible-docker-talk,代码行数:11,代码来源:WicketApplication.java


注:本文中的org.apache.wicket.spring.injection.annot.SpringComponentInjector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。