Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-165

Re-enable scanning for providers

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 2.0
    • integration
    • None
    • 3

      Because the anonymous Application nested under our RestDispatcherServlet declares explicit singletons; automatic scanning of providers, resource and application classes is turned off.

      new Application() { 
          @Override 
          public Set<Object> getSingletons() { 
              Set<Object> singletons = new HashSet<>(); 
              singletons.addAll(endpoints.values()); 
              return singletons; 
          } 
      }
      

      Restoring automatic scanning for providers would let us
      1. remove the META-INF file(s), as well as
      2. remove the need for module-config for additional providers.

      We may consider:

      • ad-hoc scanning from specific packages
      • leveraging a ServletContainerInitializer for class filtering

        Acceptance criteria

              Unassigned Unassigned
              mgeljic Mikaël Geljić
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:

                  Task DoR