[MGNLREST-100] Research possibility to remove Providers file in META-INF Created: 21/Aug/17  Updated: 11/Jan/18  Resolved: 23/Oct/17

Status: Closed
Project: Magnolia REST Framework
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Sang Ngo Huu Assignee: Mikaël Geljić
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLREST-99 Research possibility to move the Prov... Open
is cloned by MGNLREST-165 Re-enable scanning for providers Open
relation
is related to MGNLREST-96 CLONE - Implement basic "listing" end... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Sprint: Saigon 119
Story Points: 2

 Description   

Investigate removing the META-INF files

  • rely on @Providers automatic discovery instead
  • maybe did not work because of RestDispatcherServlet?
    • does default #getSingletons return annotated providers?
    • is it because of our RestDispatcherServlet?
      new Application() { 
          @Override 
          public Set<Object> getSingletons() { 
              Set<Object> singletons = new HashSet<>(); 
              singletons.addAll(endpoints.values()); 
              return singletons; 
          } 
      }
      


 Comments   
Comment by Mikaël Geljić [ 23/Oct/17 ]

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

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.

Generated at Mon Feb 12 06:56:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.