Created
June 1, 2016 21:23
-
-
Save authsec/0c11168e2f7430623fae1f306d5c3f07 to your computer and use it in GitHub Desktop.
ReST Endpoint Catch All
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ApplicationScoped @Path("/") @Produces(MediaType.TEXT_HTML) | |
public class Index { | |
@GET @Path("/{any : .*}") | |
public Response root() { | |
return Response.ok().entity("<!DOCTYPE html>\n" + | |
"<html>\n" + | |
" <head>\n" + | |
" <title>Response</title>\n" + | |
" </head>\n" + | |
" <body>\n" + | |
" <h1>Catch All Response</h1>\n" + | |
" </body>\n" + | |
"</html>").build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment