All Projects → StubbornJava → Stubbornjava

StubbornJava / Stubbornjava

Licence: mit
Unconventional Java code for building web servers / services without a framework. Think dropwizard but as a seed project instead of a framework. If this project had a theme it would be break the rules but be mindful of your decisions.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Stubbornjava

Terse Logback
Structured Logging, Tracing, and Observability with Logback
Stars: ✭ 146 (-20.65%)
Mutual labels:  json, logback, slf4j
Sofa Common Tools
sofa-common-tools is a library that provide some utility functions to other SOFA libraries.
Stars: ✭ 141 (-23.37%)
Mutual labels:  logback, slf4j
Androidstarter
A sample Android app using the MVP architecture.
Stars: ✭ 140 (-23.91%)
Mutual labels:  jackson, okhttp3
Ops Cli
Ops - cli wrapper for Terraform, Ansible, Helmfile and SSH for cloud automation
Stars: ✭ 152 (-17.39%)
Mutual labels:  ansible, terraform
Multi Env Deploy
Complete example of deploying complex web apps to AWS using Terraform, Ansible, and Packer
Stars: ✭ 132 (-28.26%)
Mutual labels:  ansible, terraform
Tensor
Tensor - Comprehensive web-based automation framework and Centralized infrastructure management platform
Stars: ✭ 136 (-26.09%)
Mutual labels:  ansible, terraform
Logstash Logback Encoder
Logback JSON encoder and appenders
Stars: ✭ 1,987 (+979.89%)
Mutual labels:  json, logback
Terraform Inventory
Terraform State → Ansible Dynamic Inventory
Stars: ✭ 1,591 (+764.67%)
Mutual labels:  ansible, terraform
Terraform Inventory
An Ansible dynamic inventory script to pair with nbering/terraform-provider-ansible.
Stars: ✭ 154 (-16.3%)
Mutual labels:  ansible, terraform
Terrible
An Ansible playbook that apply the principle of the Infrastructure as Code on a QEMU/KVM environment.
Stars: ✭ 161 (-12.5%)
Mutual labels:  ansible, terraform
Jackson Core
Core part of Jackson that defines Streaming API as well as basic shared abstractions
Stars: ✭ 2,003 (+988.59%)
Mutual labels:  json, jackson
Hybrid multicloud overlay
MutiCloud_Overlay demonstrates a use case of overlay over one or more clouds such as AWS, Azure, GCP, OCI, Alibaba and a vSphere private infrastructure in Hub and spoke topology, point to point topology and in a Single cloud. Overlay protocols IPv6 and IPv4 are independent of underlying infrastructure. This solution can be integrated with encryption and additional security features.
Stars: ✭ 127 (-30.98%)
Mutual labels:  ansible, terraform
Livedata Call Adapter
A simple LiveData call adapter for retrofit
Stars: ✭ 119 (-35.33%)
Mutual labels:  json, okhttp3
Nice Knowledge System
📚不积跬步无以至千里,每天进步一点点,Passion,Self-regulation,Love and Share
Stars: ✭ 137 (-25.54%)
Mutual labels:  gradle, okhttp3
Config Lint
Command line tool to validate configuration files
Stars: ✭ 118 (-35.87%)
Mutual labels:  terraform, json
Terraform Provider Shell
Terraform provider for executing shell commands and saving output to state file
Stars: ✭ 172 (-6.52%)
Mutual labels:  terraform, json
Marklogic Data Hub
The MarkLogic Data Hub: documentation ==>
Stars: ✭ 113 (-38.59%)
Mutual labels:  gradle, json
Terraform Null Ansible
Terraform Module to run ansible playbooks
Stars: ✭ 114 (-38.04%)
Mutual labels:  ansible, terraform
Infrastructure As Code Tutorial
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
Stars: ✭ 1,954 (+961.96%)
Mutual labels:  ansible, terraform
Jackson Datatype Money
Extension module to properly support datatypes of javax.money
Stars: ✭ 165 (-10.33%)
Mutual labels:  json, jackson

Release Follow @StubbornJava

StubbornJava

https://www.stubbornjava.com/

This is very much a work in progress and in the early stages. No code will be pushed to maven central or supported in any way currently. Feel free to clone and install locally. The website is built using all the methods described on the site and in the examples. There is no backing blog framework.

Quick Example (full example Simple REST server in Undertow)

public static void createUser(HttpServerExchange exchange) {
    User userInput = userRequests.user(exchange);
    User user = userDao.create(userInput.getEmail(), userInput.getRoles());
    if (null == user) {
        ApiHandlers.badRequest(exchange, String.format("User %s already exists.", userInput.getEmail()));
        return;
    }
    exchange.setStatusCode(StatusCodes.CREATED);
    Exchange.body().sendJson(exchange, user);
}

public static void getUser(HttpServerExchange exchange) {
    String email = userRequests.email(exchange);
    User user = userDao.get(email);
    if (null == user) {
        ApiHandlers.notFound(exchange, String.format("User %s not found.", email));
        return;
    }
    Exchange.body().sendJson(exchange, user);
}
    
public static final RoutingHandler ROUTES = new RoutingHandler()
    .get("/users/{email}", timed("getUser", UserRoutes::getUser))
    .post("/users", timed("createUser", UserRoutes::createUser))
    .get("/metrics", timed("metrics", CustomHandlers::metrics))
    .get("/health", timed("health", CustomHandlers::health))
    .setFallbackHandler(timed("notFound", RoutingHandlers::notFoundHandler));

public static final HttpHandler ROOT = CustomHandlers.exception(EXCEPTION_THROWER)
    .addExceptionHandler(ApiException.class, ApiHandlers::handleApiException)
    .addExceptionHandler(Throwable.class, ApiHandlers::serverError);

public static void main(String[] args) {
    SimpleServer server = SimpleServer.simpleServer(Middleware.common(ROOT));
    server.start();
}

Suggest a Topic

Check out issues to suggest topics, bug fixes, errors, or vote on issues. Reactions / comments may influence the order topics are added but no guarantees. Several topics will not be accepted here such as larger frameworks (Spring, Play, Jersey ...) as well as dependency injection. We will be more focused on rolling things yourself and solving practical problems. The coding style here may not fit with the norm but it should be very easy to convert any of the classes to be DI friendly.

Getting Started

A guide for building your own minimal embedded Java web server. A simple in order intro to a lot of uses cases for simple web development.

Dev Tools

HTML / CSS Themes and Templates for rapid prototyping

Libraries

SLF4J and Logback for Logging

SLF4J is fairly standard and we chose to use Logback as our underlying implementation.

Typesafe Config For Configuration

Typesafe config is a clean lightweight immutable configuration library. It offers several formats such as .properties, .yml, .json as well as a human friendly json super set. It handles configuration inheritance, includes, data types (string, boolean, int, long, double, durations, arrays, ...), variabe substitution and many more features. Typesafe Config examples

Jackson for JSON

Embedded Undertow Web Server

Undertow is a very fast low level non blocking web server written in Java. It is very lightweight and has a very clean API that should be relatively easy for anyone who knows HTTP to pick up. Most custom code will be in the form of an HttpHandler which is a simple interface that can be used in a variety of ways.

Metrics (Dropwizard Metrics, Grafana, Graphite)

OkHttp for HTTP Client

HikariCP for JDBC Connection Pooling

HikariCP is a very fast lightweight Java connection pool. The API and overall codebase is relatively small (A good thing) and highly optimized. It also does not cut corners for performance like many other Java connection pool implementations.

Uility Classes / Extras

Sites Built With This Method

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].