An open API service indexing awesome lists of open source software.

https://github.com/daniloqueiroz/superunknown

Glue framework for Rest APIs using Jersey, Netty, Gson, Logback and Java8
https://github.com/daniloqueiroz/superunknown

Last synced: 15 days ago
JSON representation

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

Awesome Lists containing this project

README

          

[![Release](https://jitpack.io/v/daniloqueiroz/superunknown.svg)](https://jitpack.io/#daniloqueiroz/superunknown)

# 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

```java
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.

```java
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](https://github.com/daniloqueiroz/superunknown/blob/master/src/main/java/superunknown/Application.java) for more about how to get started.