Support sub-resource locators
I have a highly dynamic application which makes use of JAX-RS sub-resource locators. Unfortunately, those are not supported by default with MVC.
I could work around this limitation with a custom interceptor on my locator method (@ControllerLocator) which intercepts the result of the method and decorates the sub-resource with an InterceptionFactory to apply the interceptors needed for @Controller to work. This workaround depends on vendor-specific (krazo) classes like AroundController and ValidationInterceptorBinding. If the interceptors had been bound to @Controller (which could be turned into an InterceptorBinding via BeforeBeanDiscovery.addQualifier()) instead of specific annotations then it could have been implemented without relying on krazo classes.
Thanks for your feedback. We could try to implement the support for sub-resource locators in Krazo first. If we manage to implement this correctly (including all features like validation, CSRF protection, etc.) we could add the requirement to the spec as well.
@eclipse-ee4j/ee4j-mvc-committers Thoughts?
Agree! This will also most likely be faster as we will do a 1.1 (first Jakarta MVC) release and then a 2.0 (javax-jakarta namespace switch) before adding functionality to the spec.