Code Monkey home page Code Monkey logo

spring-hexagonal-architecture-template's Introduction

Spring backend application template with Hexagonal architecture

Architecture

The application's architecture is Hexagonal architecture. The following articles will explain the purpose and benefits of it, and how to configure it:

  1. Baeladung Hexagonal architecture
  2. Medium Hands-on Hexagonal architecture

Development

Setup

  1. Download and setup JDK 17.
  2. Download Maven dependency manager: Maven Download
  3. Run maven command in the project's root folder: mvn clean install

Database

At first we are using an embedded H2 database without using a schema manager (Liquibase)

After the application starts, H2 developer console is available on the following URL: http://localhost:8080/h2-console
In order to connect, provide the necessary information, which can be find in application-local.properties file.

Run

  1. In run configurations, set Spring active profiles to local (spring.profiles.active=local)
  2. Run the application from IDEA: hu.isakots.HexagonalTemplateApplication
    or from command-line: mvn spring-boot:run

Features

This template contains the following features:

  • Already arranged hexagonal architecture
  • Implemented token-based authentication
  • Minimalist exception handling (it handles exceptions thrown by validation API as well)
  • OpenAPI configuration (although it's not working, bcz Spring Boot v3 is not supported yet)
  • GitHub workflow to build the project

spring-hexagonal-architecture-template's People

Contributors

isakots avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

opthomas-iw

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.