Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5079

Allow WebApplication-specific Spring configuration

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.6.0
    • Fix Version/s: 6.7.0
    • Component/s: wicket-spring
    • Labels:
      None

      Description

      SpringWebApplicationFactory allows two places to defined a WebApplication:

      • in the global root application context loaded by Spring's ContextLoaderListener
      • in a filter-specific additional web applcation context.

      SpringComponentInjector is not aware of this additional context but just uses the global one. This imposes the following restrictions:

      • the filter-specific context cannot define any beans to be used by SpringComponentInjector
      • SpringComponentInjector cannot work without a global root application, i.e.ContextLoaderListener is required.

      Starting with Wicket 6.7.0 the filter-specific context is made accessible to SpringComponentInjector. If no application context is given explicitly to SpringComponentInjector's constructor, by default the injector uses the application context used to create the WebApplication.

      Benefits:

      • no need to define ContextLoaderListener in web.xml (i.e. less xml)
      • use application-specific beans defined in the filter-specific application context

        Attachments

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              svenmeier Sven Meier
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: