Giter Club home page Giter Club logo

spring-boot-3.2-authentication-openapi-archetype's Introduction

Spring Boot Archetype with preconfigured OpenApi and Spring Security

This is a maven archetype project to make it easier to start a new project with preconfigured Spring Security (based on JWT token) and OpenApi which is freely modifiable

Technology stack

  • Spring Boot 3.2.4 (http://start.spring.io)
  • Hibernate, Spring Data JPA
  • Liquibase
  • Mapstruct
  • Lombok
  • Swagger
  • Maven

Getting Started

Prerequisites

Must have Maven 3+ and Java 17 installed

To create a project from the archetype must first be installed in the local repository.

Checkout the repository and run

mvn clean install

Create a new project from the archetype

mvn archetype:generate -DarchetypeGroupId=com.divide.by.zero.archetype -DarchetypeArtifactId=springboot3.2-authentication-openapi-archetype -DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=<YOUR GROUP ID HERE> -DartifactId=<YOUR ARTIFACT ID HERE> -Dversion=1.0.0-SNAPSHOT -DartifactIdCamelCase=<YourCamelCaseArtifactIdHere>

The generated project contains three different modules and one directory:

api

app

security

docker

API

The API module contains the OpenApi yaml file in the src/main/resources folder. Contains everything needed for authentication (controller, requests, responses).

APP

This APP module is a skeleton for the spring boot application. The app uses a postgres database to store the necessary user information and liquibase to manage database changes. (includes the default settings for user and token table)

Docker file:

The docker directory contains a docker-compose.yml. Before start using you have to change the image name to your own.

Required environment variables:

DB_URL This is the url of the postgres server. Default value: jdbc:postgresql://localhost:5432/postgresDB

DB_USERNAME This is the username of the postgres server. Default value: username

DB_PASSWORD This is the password of the postgres server. Default value: password

SECURITY

This SECURITY module contains all the necessary preconfigured class to make the application secured with JWT token.

Authors

  • Tamas Meszaros

spring-boot-3.2-authentication-openapi-archetype's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.