[MGNLREST-165] Re-enable scanning for providers Created: 11/Jan/18  Updated: 30/Mar/22

Status: Open
Project: Magnolia REST Framework
Component/s: integration
Affects Version/s: 2.0
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Mikaël Geljić Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLREST-100 Research possibility to remove Provid... Closed
Relates
relates to MGNLREST-92 Revise REST servlet integration Open
dependency
depends upon MAGNOLIA-8286 As a developer, I can add a servlet v... Closed
depends upon MGNLCE-297 Allow discovering of filters/servlets... Discovery
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Story Points: 3

 Description   

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


 Comments   
Comment by Christopher Zimmermann [ 24/Mar/22 ]

Is this still relevant?

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