Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-528

Code in SpringContextLoader should be usable for those with their own ContextLoader subclass (patch & tests included)


    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 2.2.RC1
    • 2.0.1.GA
    • jaxrs

      The code SpringContextLoader is pretty handy, but is only usable if you normally use Spring's default ContextLoader. If your app already has its own custom subclass of ContextLoader, the only way to use this code to have RESTEasy discover your endpoints is to copy/paste the code into your custom context loader.

      A solution (that is included in the patch) is to extract all that code into a class with no superclass; the code in question doesn't rely on the fact that it's inside a subclass of ContextLoader.

      This new class can then be used to get the functionality, but without forcing me to use the RESTEasy subclass of ContextLoader.

      Patch includes:

      • Changes described
      • Tests (written first) that cover the current version of SpringContextLoader. After extracting the code to SpringContextLoaderSupport (feel free to come up with a better name), the tests still pass.

            patriot1burke@gmail.com Bill Burke (Inactive)
            davetron5000_jira David Copeland (Inactive)
            1 Vote for this issue
            1 Start watching this issue