Giter Site home page Giter Site logo

spring-boot-gradle-boilerplate-master's Introduction

spring-boot-gradle-boilerplate

A boilerplate which uses Spring Boot 2 and Gradle

Prerequisites

  • Gradle 4 +
  • JDK 8 +

Features

This boilerplate comes bundled with the following features:

  1. Spring Boot Starter Web (version 2.0.4)
  2. Undertow web server, replacing the default Tomcat server
  3. Spring Actuator for health and metrics
  4. Log4j2 for better control over logging
  5. Logbook for logging API requests and responses
  6. YAML based Spring configuration with support for different deployment environment configuration
  7. Different configuration of Log4j2 based on the deployment environment
  8. A filter to assign an unique ID for each API request

How to use?

  1. Clone the repository.
git clone https://github.com/ibipn/spring-boot-gradle-boilerplate.git
cd spring-boot-gradle-boilerplate/
  1. Build the project.
./gradlew bootJar
  1. Run the Spring Boot application.
./gradlew bootRun

If you need to run the application with different deployment environment properties,

SPRING_PROFILES_ACTIVE=production ./gradlew bootRun

Build and run using Docker

  1. Build the docker image.
docker build \
    --build-arg JAR_FILE=Spring-Boot-Gradle-Boilerplate-0.0.1-SNAPSHOT.jar \
    -t spring-boot-gradle-boilerplate:0.0.1-SNAPSHOT \
    .
  1. Run the application in docker container.
docker run --rm -p 8080:8080 spring-boot-gradle-boilerplate:0.0.1-SNAPSHOT
```# spring-boot-gradle-boilerplate-master

spring-boot-gradle-boilerplate-master's People

Contributors

c0d3-k1ra avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.