Skip to content

Integrates Jersey JAX-RS implementation with Vert.x application framework

Notifications You must be signed in to change notification settings

antoineroux/vert.x-jersey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project provides a simple integration between Vert.x and Jersey (JAX-RS implementation).

Here is an example of how you can use it. For instance, if you want to make your REST resources in the package com.example.resources accessible from /api:

public class Demo implements VertxApp {
    
    public void start() {
        RouteMatcher rm = new RouteMatcher();

        try {
            rm.all(
                "/api/.*", 
                new RestHandler(new URI("http://localhost:8080/api/")), 
                "com.example.resources");
        } catch (URISyntaxException e) {
            // Exceptions are currently not handled by the project.
            e.printStackTrace();
        }        
        
        server = new HttpServer().requestHandler(rm).listen(8080);
    }
}

About

Integrates Jersey JAX-RS implementation with Vert.x application framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published