Java 类org.springframework.security.web.session.HttpSessionEventPublisher 实例源码

项目:springsecuritystudy    文件:WebAppInitializer.java   
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
    servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy("springSecurityFilterChain"))
    .addMappingForUrlPatterns(null, false, "/api/*");

    // 静态资源映射
    servletContext.getServletRegistration("default").addMapping("/static/*", "*.html", "*.ico");

    servletContext.addListener(HttpSessionEventPublisher.class);
    super.onStartup(servletContext);
}
项目:REST-Web-Services    文件:WebSecurityConfig.java   
/**
 * Implemented a listener - HttpSessionEventPublisher.
 */
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:Spring-5.0-Cookbook    文件:SpringContextConfig.java   
@Bean
 public HttpSessionEventPublisher httpSessionEventPublisher() {
        return new HttpSessionEventPublisher();
}
项目:Spring-5.0-Cookbook    文件:SpringContextConfig.java   
@Bean
 public HttpSessionEventPublisher httpSessionEventPublisher() {
        return new HttpSessionEventPublisher();
}
项目:amanda    文件:SecurityConfiguration.java   
@SuppressWarnings("unchecked")
@Bean
public static ServletListenerRegistrationBean httpSessionEventPublisher() {
    return new ServletListenerRegistrationBean(new HttpSessionEventPublisher());
}
项目:FCat    文件:SessionApplicationInitializer.java   
@Override
protected void afterSessionRepositoryFilter(ServletContext servletContext) {
    servletContext.addListener(new HttpSessionEventPublisher());
}
项目:Spring-Security-Third-Edition    文件:SecurityConfig.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:Spring-Security-Third-Edition    文件:SessionConfig.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:Spring-Security-Third-Edition    文件:SecurityConfig.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:spring-session    文件:RedisHttpSessionConfig.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:wicket-spring-jpa-bootstrap-boilerplate    文件:WebAppInitializer.java   
@Override
public void onStartup(ServletContext sc) throws ServletException {

  log.debug("web starting up...");

  // Create the 'root' Spring application context
  AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
  ctx.register(SpringConfiguration.class);
  ctx.refresh();

  // Register the Spring Context in the ServletContext
  sc.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ctx);

  // Request Listener
  sc.addListener(new RequestContextListener());

  // Manages the lifecycle
  sc.addListener(new ContextCleanupListener());

  sc.addListener(new HttpSessionEventPublisher());


  log.info("web initialized.");
}
项目:enhanced-pet-clinic    文件:MultiHttpSecurityConfig.java   
@Bean
public static ServletListenerRegistrationBean<HttpSessionEventPublisher> httpSessionEventPublisher() {
    return new ServletListenerRegistrationBean<HttpSessionEventPublisher>(new HttpSessionEventPublisher());
}
项目:molgenis    文件:MolgenisWebAppSecurityConfig.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher()
{
    return new HttpSessionEventPublisher();
}
项目:molgenis    文件:MolgenisWebAppInitializer.java   
/**
 * A Molgenis common web application initializer
 */
protected void onStartup(ServletContext servletContext, Class<?> appConfig, int maxFileSize)
{
    // Create the 'root' Spring application context
    AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();
    rootContext.register(appConfig);

    // Manage the lifecycle of the root application context
    servletContext.addListener(new ContextLoaderListener(rootContext));

    // Register and map the dispatcher servlet
    DispatcherServlet dispatcherServlet = new DispatcherServlet(rootContext);
    dispatcherServlet.setDispatchOptionsRequest(true);
    // instead of throwing a 404 when a handler is not found allow for custom handling
    dispatcherServlet.setThrowExceptionIfNoHandlerFound(true);

    ServletRegistration.Dynamic dispatcherServletRegistration = servletContext.addServlet("dispatcher",
            dispatcherServlet);
    if (dispatcherServletRegistration == null)
    {
        LOG.warn("ServletContext already contains a complete ServletRegistration for servlet 'dispatcher'");
    }
    else
    {
        final long maxSize = (long) maxFileSize * MB;
        dispatcherServletRegistration.addMapping("/");
        dispatcherServletRegistration.setMultipartConfig(
                new MultipartConfigElement(null, maxSize, maxSize, FILE_SIZE_THRESHOLD));
    }

    // add filters
    Dynamic browserDetectionFiler = servletContext.addFilter("browserDetectionFilter",
            BrowserDetectionFilter.class);
    browserDetectionFiler.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "*");

    Dynamic etagFilter = servletContext.addFilter("etagFilter", ShallowEtagHeaderFilter.class);
    etagFilter.addMappingForServletNames(EnumSet.of(DispatcherType.REQUEST), true, "dispatcher");

    Dynamic corsFilter = servletContext.addFilter("corsFilter", CorsFilter.class);
    corsFilter.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, "/api/*");
    corsFilter.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, "/fdp/*");

    // enable use of request scoped beans in FrontController
    servletContext.addListener(new RequestContextListener());

    servletContext.addListener(HttpSessionEventPublisher.class);
}
项目:Spring-Security-Third-Edition    文件:SecurityConfig.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:Spring-Security-Third-Edition    文件:SessionConfig.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:AntiSocial-Platform    文件:SecurityConfiguration.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher(){
    return new HttpSessionEventPublisher();
}
项目:AntiSocial-Platform    文件:SecurityWebApplicationInitializer.java   
/**
 * Security Web Application Initializer
 *
 * Filtering for multi part file upload.
 * Adding listener to collect session events.
 *
 *  @author Ant Kaynak - Github/Exercon
 * */


@Override
protected void beforeSpringSecurityFilterChain(ServletContext servletContext) {
    insertFilters(servletContext, new MultipartFilter());
    servletContext.addListener(HttpSessionEventPublisher.class);
}
项目:AntiSocial-Platform    文件:SecurityConfiguration.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher(){
    return new HttpSessionEventPublisher();
}
项目:AntiSocial-Platform    文件:SecurityWebApplicationInitializer.java   
/**
 * Security Web Application Initializer
 * Adding listener to collect session events.
 *
 *  @author Ant Kaynak - Github/Exercon
 * */


@Override
protected void beforeSpringSecurityFilterChain(ServletContext servletContext) {
    servletContext.addListener(HttpSessionEventPublisher.class);
}
项目:data-migration    文件:WebSecurityConfiguration.java   
@Bean
public ServletListenerRegistrationBean httpSessionEventPublisher() {
    return new ServletListenerRegistrationBean(new HttpSessionEventPublisher());
}
项目:wonderjameeee    文件:SecurityConfiguration.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:spring-boot-oauth2-rest-service-password-encoding    文件:OAuth2Configuration.java   
@Bean
public HttpSessionEventPublisher httpSessionEventPublisher() {
    return new HttpSessionEventPublisher();
}
项目:generator-adansa    文件:WebConfig.java   
@Bean
public HttpSessionEventPublisher registerHttpSessionEventPublisher(){
    return new HttpSessionEventPublisher();
}
项目:whisper    文件:ApplicationSecurity.java   
@Bean
public ServletListenerRegistrationBean<HttpSessionEventPublisher> httpSessionEventPublisher() {
    return new ServletListenerRegistrationBean<HttpSessionEventPublisher>(new HttpSessionEventPublisher());
}
项目:hawkbit    文件:SecurityManagedConfiguration.java   
/**
 * Listener to redirect to login page after session timeout. Close the
 * vaadin session, because it's is not possible to redirect in
 * atmospehere.
 *
 * @return the servlet listener.
 */
@Bean
public ServletListenerRegistrationBean<HttpSessionEventPublisher> httpSessionEventPublisher() {
    return new ServletListenerRegistrationBean<>(new HttpSessionEventPublisher());
}