Coder Social home page Coder Social logo

rimmelasghar / springboot-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
41.0 2.0 5.0 307 KB

Spring Boot Boilerplate is a starter kit for developing production ready SpringBoot Applications. This project includes : Spring Boot(3.1.2), Spring Data JPA, Spring Validation, Spring Security + JWT Token, MySQL, Mapstruct, Lombok, Swagger.

License: Apache License 2.0

Java 99.59% Dockerfile 0.41%
java jpa-hibernate jsonwebtoken jwt-authentication lombok mapstruct mysql mysqlconnector rest-api spring-boot spring-boot-2 spring-security swagger-ui docker docker-compose docker-image

springboot-boilerplate's Introduction

Spring-Boot BoilerPlate

License

Description

Spring Boot Boilerplate is an advanced foundation designed to facilitate the development of robust, production-ready Spring Boot applications. This comprehensive project encompasses a cutting-edge technology stack, featuring Spring Boot (version 3.1.2), Spring Data JPA, Spring Validation, Spring Security with JWT Token support, MySQL integration, Mapstruct for seamless data mapping, Lombok for concise code generation, and Swagger for streamlined API documentation.

Table of Contents

Installation

$ git clone https://github.com/rimmelasghar/SpringBoot-boilerPlate.git
$ cd SpringBoot-boilerPlate

Make sure you have docker and docker-compose installed docker installation guide

Step 1: Configuration Setup

create .env file in root folder.

DB_ROOT_PASSWORD=mySecretRootPass
MYSQL_DATABASE=yourdbname
MYSQL_USER=yourdbusername
MYSQL_PASSWORD=dbpasswword
JWT_ISSUER=https://github.com/rimmelasghar
SWAGGER_CONTACT_MAIL=youremail
SWAGGER_CONTACT_URL=yourwebsite
SWAGGER_APP_NAME=Spring Boot Boilerplate Project
SWAGGER_APP_VERSION=2.0.0
SWAGGER_APP_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.html
SWAGGER_APP_LICENSE=Apache 2.0

This .env file contains the essential environment variables needed for your application to run.

Step 2: Build Docker Images

Open a terminal or command prompt, navigate to your project's root folder, and run the following command to build the Docker images:

docker-compose build

This command will create Docker images based on the configurations defined in your docker-compose.yml file.

Step 3: Start Application

After the Docker images are built, run the following command to start your application:

docker-compose up

Now, your application will be up and running. You can access it in your web browser at http://localhost:8000.

Features

  1. Spring Boot 3.1.2: The application is built using the latest version of Spring Boot, providing a solid foundation for developing robust and efficient Spring applications.

  2. Spring Data JPA: Spring Data JPA simplifies database access using the Java Persistence API (JPA) and provides easy-to-use repositories for interacting with the database.

  3. Spring Validation: The application implements Spring Validation to ensure data integrity and validity, making it more reliable and secure.

  4. Spring Security + JWT Token: Spring Security is integrated into the application to handle authentication and authorization. It uses JSON Web Tokens (JWT) for secure token-based authentication.

  5. MySQL: The application is configured to use MySQL as the backend database, allowing for persistent data storage.

  6. Mapstruct: Mapstruct is used to simplify the mapping between DTOs (Data Transfer Objects) and entities, reducing boilerplate code and enhancing maintainability.

  7. Lombok: Lombok reduces the verbosity of Java code by providing annotations to automatically generate boilerplate code for getters, setters, constructors, etc.

  8. Swagger: The application includes Swagger, a powerful tool for documenting and testing APIs. Swagger UI provides an interactive API documentation that makes it easy for developers to understand and use the API endpoints.

These features collectively form a strong foundation for developing production-ready Spring Boot applications, saving development time and effort and ensuring best practices are followed throughout the development process.

Documentation

  • Swagger UI:
  • Get Request:

Contributing

To contribute to this project, follow these steps:

  1. Fork this repository.
  2. Create a new branch: git checkout -b feature/your-feature
  3. Make your changes and commit them: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature.
  5. Submit a pull request.

License

This project is licensed under the MIT License.

Contact

Reach out to me [email protected]

made by Rimmel Asghar with ❤️

springboot-boilerplate's People

Contributors

rimmelasghar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.