Skip to content

shounoop/springboot3-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot 3 Template

A modern, extensible Spring Boot 3 project template with advanced features for scalable enterprise applications.


Table of Contents


Overview

This repository provides a robust starting point for Spring Boot 3 projects, including multi-database support, advanced transaction management, real-time capabilities, and best practices for modern Java development.

Implemented Features

  • Multi-database configuration and multiple transaction managers (support for connecting and managing more than one database, handling transactions across multiple databases)
  • Real-time integration with Firebase
  • Base entity, base controller, base service, and common mapper for code reusability
  • Spring Data JPA for data access
  • Spring Web for building RESTful APIs
  • Spring Security for authentication and authorization
  • MapStruct and Lombok integration for DTO/entity mapping and reduced boilerplate
  • Jakarta Validation API and Hibernate Validator for bean validation
  • Swagger/OpenAPI documentation (SpringDoc)
  • SonarQube Maven Plugin for code quality analysis
  • Docker & Docker Compose support for containerization
  • Spring Boot DevTools for enhanced development experience
  • Spring Boot Actuator for monitoring and management
  • Internationalization (i18n) support
  • Excel import/export functionality
  • Logging with AOP

Project Setup

Prerequisites

  • Java 17 or higher
  • Maven 3.8 or higher
  • Docker (for Docker Compose)

Installation

  1. Clone the repository:
    git clone https://github.com/shounoop/springboot3-template.git
    cd codebase-spring-boot-3
  2. Configure your database(s) and environment variables as needed in src/main/resources/application.yml.

Running the Application

Using Maven

mvn spring-boot:run

Using Java

mvn clean package
java -jar target/spring-boot-3-0.0.1-SNAPSHOT.jar

Using Docker Compose

docker-compose up -d

References

Todo

  • Implement base entity, base controller, base service, and common mapper for code reusability.
  • Enable concurrent Excel file export using CompletableFuture for efficient asynchronous processing.
  • Integrate a custom executor (ThreadPoolTaskExecutor) with Spring Boot's @Async for advanced async task management.
  • Add authentication and authorization using Keycloak.
  • Integrate real-time communication with Socket.IO and MQTT.
  • Add MinIO for object storage solutions.
  • Implement caching with Redis and Memcached.
  • Integrate message queues: Kafka, RabbitMQ, and ActiveMQ.
  • Expand unit testing coverage.
  • Add support for DOCX file manipulation using Docx4j.
  • Set up monitoring and logging with Prometheus, ELK Stack, and Grafana.
  • Enable and configure CORS for cross-origin requests.
  • Export word with template using docx4j
  • Swagger: Strategies for microservices

Contributing

Contributions are welcome! Please open issues or submit pull requests for improvements, bug fixes, or new features.