Skip to content

Automatically register HttpSessionIdListener beans with the servlet context #24879

Closed
@mahairod

Description

@mahairod

At the present moment Spring Boot 2 does not handle automatic web listener registration. For this reason ServletListenerRegistrationBean is recommended to use. But this bean doesn't support relatively new HttpSessionIdListener (actually already legacy from spring boot's point of view) which is necessary to track session when using together with Spring security enabled. At the moment only these types of listeners are supported:

	types.add(ServletContextAttributeListener.class);
	types.add(ServletRequestListener.class);
	types.add(ServletRequestAttributeListener.class);
	types.add(HttpSessionAttributeListener.class);
	types.add(HttpSessionListener.class);
	types.add(ServletContextListener.class);

Also look here at the description of what listeners should be supported.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions