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
- Host: GitHub
- URL: https://github.com/daniloqueiroz/superunknown
- Owner: daniloqueiroz
- License: gpl-3.0
- Created: 2013-04-18T16:37:36.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2017-07-07T17:34:37.000Z (almost 9 years ago)
- Last Synced: 2025-03-21T10:52:49.526Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 958 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](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.