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

resteasy-spring is too restrictive when dealing with @Configuration factory beans

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 2.3.4.Final
    • None
    • Hide

      Use public methods only in @Configuration classes.

      Show
      Use public methods only in @Configuration classes.
    • Low

    Description

      The SpringBeanProcessor was updated in RESTEASY-511 / RESTEASY-679 to better support Spring 3.1 @Configuration classes. However, while Spring makes no requirements on the visibility of methods in these classes, the bean processor is only looking for public methods.

      Please see line 399 of org.jboss.resteasy.plugins.spring.SpringBeanProcessor.java

      The current implementation uses getBeanClass(factoryClassName).getMethods(). This should probably be something more sophisticated, maybe utilizing Spring's own code like org.springframework.util.ReflectionUtils#getAllDeclaredMethods.

      The workaround is obviously to set all declared methods in @Configuration classes to be public.

      Attachments

        Issue Links

          Activity

            People

              patriot1burke@gmail.com Bill Burke (Inactive)
              bfagin Ben Fagin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: