Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi ApplicationPaths #59

Open
hantsy opened this issue Mar 3, 2021 · 3 comments
Open

Support multi ApplicationPaths #59

hantsy opened this issue Mar 3, 2021 · 3 comments

Comments

@hantsy
Copy link

hantsy commented Mar 3, 2021

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.

  • default media type set to application/json
  • use jwt stateless auth.

/web for MVC web pages.

  • default media type is text/html
  • use a form based login, and enable session for loggined user.
@chkal
Copy link
Contributor

chkal commented Mar 6, 2021

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
Copy link
Author

hantsy commented Mar 7, 2021

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

@ivargrimstad
Copy link
Member

Looks like Jakarta REST will standardize this in their 4.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants