org.apache.wicket.protocol.http.WebApplication.setRootRequestMapper()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.apache.wicket.protocol.http.WebApplication.setRootRequestMapper()方法的一些代码示例,展示了WebApplication.setRootRequestMapper()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApplication.setRootRequestMapper()方法的具体详情如下:
包路径:org.apache.wicket.protocol.http.WebApplication
类名称:WebApplication
方法名:setRootRequestMapper

WebApplication.setRootRequestMapper介绍

暂无

代码示例

代码示例来源:origin: com.giffing.wicket.spring.boot.starter/wicket-spring-boot-starter

@Override
public void init(WebApplication webApplication) {
  webApplication.setRootRequestMapper(new CryptoMapper(webApplication.getRootRequestMapper(), webApplication));
  
  wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
      .withDetail("properties", props)
      .build());
}

代码示例来源:origin: MarcGiffing/wicket-spring-boot

@Override
public void init(WebApplication webApplication) {
  webApplication.setRootRequestMapper(new CryptoMapper(webApplication.getRootRequestMapper(), webApplication));
  
  wicketEndpointRepository.add(new WicketAutoConfig.Builder(this.getClass())
      .withDetail("properties", props)
      .build());
}

代码示例来源:origin: org.wicketstuff/wicketstuff-portlet

@Override
public void init(boolean isServlet, FilterConfig filterConfig) throws ServletException {
  super.init(isServlet, filterConfig);
  this.filterConfig = filterConfig;
  getApplication().getRequestCycleSettings().setRenderStrategy(RenderStrategy.REDIRECT_TO_RENDER);
  getApplication().getRequestCycleSettings().addResponseFilter(new PortletInvalidMarkupFilter());
  //fix for https://github.com/wicketstuff/core/issues/487
  getApplication().getMarkupSettings().setMarkupIdGenerator(new PortletMarkupIdGenerator());
  //make the wicket bridge schema (HTTPS/HTTP) aware
  getApplication().setRootRequestMapper(new HttpsMapper(new PortletRequestMapper(getApplication()), new HttpsConfig()){
    @Override
    protected Scheme getDesiredSchemeFor(IRequestHandler handler) {
      Request request = RequestCycle.get().getRequest();
      return super.getSchemeOf(request);
    }
  });
  //Application must use the portlet specific page renderer provider.
  getApplication().setPageRendererProvider(PortletPageRenderer::new);
  // fix for https://github.com/wicketstuff/core/issues/478 issue
  getApplication().setRequestCycleProvider(context -> new RequestCycle(context) {
    @Override
    protected UrlRenderer newUrlRenderer() {
      return new PortletUrlRenderer(getRequest());
    }
  });
  //fix for https://github.com/wicketstuff/core/issues/588 issue
  getApplication().getJavaScriptLibrarySettings().setWicketAjaxReference(WicketPortletAjaxResourceReference.get());
}

相关文章

微信公众号

最新文章

更多

WebApplication类方法