jakartaee / mvc

Jakarta MVC Specification
https://projects.eclipse.org/projects/ee4j.mvc
Eclipse Public License 2.0
24 stars 7 forks source link

Support multi ApplicationPaths #59

Open hantsy opened 3 years ago

hantsy commented 3 years ago

If I mixed Jaxrs and MVC in the same application, I hope the application paths can be declared respectively and also allow apply different config(default media type, and external security config etc) on both application paths.

eg. /api for RESTful APIs.

/web for MVC web pages.

chkal commented 3 years ago

What you can currently do to achieve this is to use two Application classes. In this case you can declare separate paths for each application. But the downside is that you cannot use resource/provider auto-discovery and instead have to implement Application#getClasses() to assign resources/controllers/providers to the correct application.

hantsy commented 3 years ago

@chkal Thanks. I have not tried it before, will check it.

ivargrimstad commented 3 years ago

Looks like Jakarta REST will standardize this in their 4.0 release