Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/indoqa/indoqa-boot

Bootstrap your project based on Javaspark, Spring, Jackson and Log4j2
https://github.com/indoqa/indoqa-boot

annotations frontend-backend indoqa-boot indoqa-library jackson jackson-json-processor java javaspark log4j spring

Last synced: 3 months ago
JSON representation

Bootstrap your project based on Javaspark, Spring, Jackson and Log4j2

Awesome Lists containing this project

README

        

# Indoqa Boot
[![Javadocs](https://www.javadoc.io/badge/com.indoqa/indoqa-boot.svg)](https://www.javadoc.io/doc/com.indoqa/indoqa-boot)

## Getting started

The best way to bootstrap an Indoqa-Boot application is using the [indoqa-quickstart-boot](https://github.com/Indoqa/indoqa-quickstart/tree/master/indoqa-quickstart-boot) Maven archetype:

```bash
mvn archetype:generate \
-DarchetypeGroupId=com.indoqa.quickstart \
-DarchetypeArtifactId=quickstart-boot-archetype \
-DarchetypeVersion=0.15.0
```

## Changelog
[Learn about the lastest improvements](./CHANGELOG.md)

## Motivation and history

In 2015 [Indoqa](https://www.indoqa.com) started to look for alternatives to traditional Java web application frameworks like JSF, Apache Wicket or Vaadin. During this journey we decided to give up Java for building web frontends and switch to Javascript. This had brought us to the question how we wanted to implement the Backend for Frontend (BFF). One alternative would have been to use node.js for the BFF implementation but in our opinion the Java platform is still years ahead in terms of stability and available libraries and tools for the development of server side applications.

The first obvious choice would have been using [Spring Boot](https://projects.spring.io/spring-boot/) but we were overwhelmed with annotations and the learning curve. We only needed a simple framework to provide RESTful resources and a JSON transformer. We came across [Javaspark](http://sparkjava.com/) and were immediately intrigued by its simplicity. The integration with [Jackson](https://github.com/FasterXML/jackson) was quickly done and this was the basis for the first internal release of Indoqa Boot. The third ingredient was the [Spring Framework](https://projects.spring.io/spring-framework/), which we use as dependency injection framework since its alpha days and helps us to structure our code.

## Goals

* Build on stable and widely adopted open source software with active communities

* Simple project setup, cover HTTP endpoints, JSON, dependency injection and logging

* Seamless integration of [React](https://facebook.github.io/react/)/[Redux](http://redux.js.org/) single page applications based on [@indoqa/react-app](https://github.com/Indoqa/indoqa-react) and [Create-React-App](https://facebook.github.io/create-react-app/).

* Reduce the usage of annotations to a minimum. We are not strictly against annotations (we use them e.g. for the mapping of Java objects to JSON) but for the most other use cases (e.g. configuration of Indoqa-Boot, creation of HTTP endpoints) we prefer to write plain Java code.

* Support of web service HTTP proxies

* Creation of an as small as possible runnable Java archive (currently 11.5 megabytes) to make the distribution and the deployment of the application simple by not relying on (bloated) Java application servers

* Small memory footprint

* Fast startup times (< 1 second) and short development cycles

* Central dependency management using a Maven bill of material (BOM) to centrally manage library updates

## Technologies

Indoqa-Boot is built upon following open source libraries and frameworks:

* [Javaspark](http://sparkjava.com/) which comes with [Jetty](http://www.eclipse.org/jetty/)
* [Jackson](https://github.com/FasterXML/jackson)
* [Spring Framework](https://projects.spring.io/spring-framework/)
* [log4j2](https://logging.apache.org/log4j/2.x/)

Additionally we use following Indoqa open source libraries:

* [indoqa-http-proxy](https://github.com/Indoqa/http-proxy) to proxy pass other web services without having to deal with CORS
* [system-test-tools](https://github.com/Indoqa/system-test-tools) for a DSL to setup and run integration tests against HTTP endpoints
* [jar-in-jar](https://github.com/Indoqa/jar-in-jar) to create runnable JAR files
* [indoqa-boot-bom](https://github.com/Indoqa/indoqa-boot-bom/blob/master/pom.xml) to manage Indoqa Boot relevant dependencies

## Usage

* [Initialization in your Java main method](./docs/initialization-java-main.md)
* [Spring: Manage your components](./docs/spring-manage-your-components.md)
* [Spark: Register your HTTP endpoints](./docs/spark-register-http-endpoints.md)
* [Jackson: Dealing with Json](./docs/jackson-dealing-with-json.md)
* [Configuration: Provide properties for run profiles, ports etc.](./docs/configuration-provide-properties.md)
* [React/Redux: Integrate a Javascript single page application](./docs/react-redux-single-page-application.md)
* [log4j2: Configure logging]()
* [Monitoring: Health checks and system info]()
* [Maven: Configure your Maven build and produce deployment artifacts]()
* [Hot-reload Java]()
* [Integration tests]()