Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 28, 2018. It is now read-only.

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.MD

Outline

Jersey and Java 8 Examples Features and Types

This example demonstrates the usage of Java 8's new constructs and types.

Currently demonstrated are:

  • Default methods in interfaces - acting as JAX-RS Resource Methods

Contents

The mapping of the URI path space is presented in the following table:

URI path Resource class HTTP method description
/j8/default-method DefaultMethodInterface GET returns interface-root in text/plain
/j8/default-method/path DefaultMethodInterface GET returns interface-path in text/plain
/j8/default-method/class DefaultMethodResource GET returns class in text/plain
/j8/lambdas/{p} LambdaResource GET returns {p}-lambdaized in text/plain

Application is Servlet 3 based, web.xml-less. Everything needed (resources/providers) is registered in the Java8Application class.

Running the Example

Run the example as follows:

mvn clean package jetty:run

This deploys current example using Jetty. You can access the application at:

Morty Proxy This is a proxified and sanitized view of the page, visit original site.