本文整理汇总了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();
}
});
}
示例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()
);
}
示例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);
});
}
示例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);
}
示例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());
}
示例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();
}
示例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();
}
示例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);
}
}
示例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();
}
示例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 );
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
示例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));
}