Skip to content

Glue framework for Rest APIs using Jersey, Netty, Gson, Logback and Java8

License

Notifications You must be signed in to change notification settings

daniloqueiroz/superunknown

Repository files navigation

Release

Superunknown

About

Simple Java Web framework based on Jersey, Netty, Logback and Gson.

It's actually just a Glue between these libraries - and apart from this, it's not much opinionated.

Getting start

public class MyApp {
    public static void main(string[] args) {
        new Application()
            .register(myresource.class)
            .start();
    }
}

You just need to create a new application, configure it/register your resources and start it.

If you want an OOP approach, you can extend the Application class and implement the initialize() method, which is called before the application start.

There's also a destroy method, called when the application is being stopped.

public class MyApp extends Application {
    public void initialize() {
        this.register(myresource.class);
        this.db = new DB();
    }

    public void destroy() {
        this.register(myresource.class);
        this.db.close();
    }

    public static void main(string[] args) {
        new MyApp().start();
    }
}

See Application.java for more about how to get started.

About

Glue framework for Rest APIs using Jersey, Netty, Gson, Logback and Java8

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published