Class I18nSpringWebContextClearer

java.lang.Object
dev.orne.i18n.spring.I18nSpringWebContextClearer
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.web.context.support.RequestHandledEvent>

@API(status=STABLE, since="0.1") public class I18nSpringWebContextClearer extends Object implements org.springframework.context.ApplicationListener<org.springframework.web.context.support.RequestHandledEvent>
Listener for Spring web contexts that removes the I18N context when the HTTP request has been handled.
Since:
0.1
Version:
1.0, 2023-05
Author:
(w) Iker Hernaez
  • Constructor Details

    • I18nSpringWebContextClearer

      public I18nSpringWebContextClearer()
      Creates a new instance.
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(org.springframework.web.context.support.RequestHandledEvent event)

      Clears the I18N context.

      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.web.context.support.RequestHandledEvent>