Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/team-dodn/spring-boot-java-template
SpringBoot basic structure template based on Java
https://github.com/team-dodn/spring-boot-java-template
java-spring java-spring-boot openfeign spring-best-practices spring-boot spring-boot-java spring-framework spring-java spring-jpa spring-multimodule spring-rest-docs spring-starters spring-template spring-web
Last synced: about 1 month ago
JSON representation
SpringBoot basic structure template based on Java
- Host: GitHub
- URL: https://github.com/team-dodn/spring-boot-java-template
- Owner: team-dodn
- License: apache-2.0
- Created: 2023-01-26T20:12:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T05:42:36.000Z (about 2 months ago)
- Last Synced: 2024-09-29T00:05:00.680Z (about 2 months ago)
- Topics: java-spring, java-spring-boot, openfeign, spring-best-practices, spring-boot, spring-boot-java, spring-framework, spring-java, spring-jpa, spring-multimodule, spring-rest-docs, spring-starters, spring-template, spring-web
- Language: Java
- Homepage:
- Size: 360 KB
- Stars: 247
- Watchers: 6
- Forks: 57
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Support: support/logging/build.gradle
Awesome Lists containing this project
README
# SpringBoot Java Template
[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Fgeminikims)](https://twitter.com/geminikims)
[![Youtube](https://img.shields.io/youtube/channel/views/UCDh8zEDofOcrOMAOnSVL9Tg?label=Youtube&style=social)](https://www.youtube.com/@geminikims)
[![CI](https://github.com/team-dodn/spring-boot-java-template/actions/workflows/ci.yml/badge.svg)](https://github.com/team-dodn/spring-boot-java-template/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)This is not the best structure. This is a good basic structure to use early in the project when productivity is important.
Remember, as your software grows, your structure must grow too.
# **Modules**
## Core
Each submodule of this module is responsible for one domain service.This must make the modular structure grow with the growth of the service.
### core:core-api
It is the only executable module in the project. It is structured to have domains to maximize initial development productivity.It is also responsible for providing APIs and setting up frameworks for services.
### core:core-enum
This module contains enums that are used by `core-api` and must be delivered to external modules.
## Clients
Submodules of this module are responsible for integrating with external systems.### clients:clients-example
This module shows an example of HTTP communication with `Spring-Cloud-Open-Feign`.
## Storage
Submodules of this module are responsible for integrating with the various storages.### storage:db-core
This module shows an example of connecting to `MySql` using `Spring-Data-JPA`.
## Support
Submodules of this module are responsible for additional support.### support:logging
This module supports logging of service and has a dependency added for distributed tracing support.It also includes dependencies to support `Sentry`.
### support:monitoring
This module supports monitoring of services.
## Tests
Submodules of this module are responsible for the convenience of writing test codes.### tests:api-docs
This module is for writing spring-rest-docs conveniently.
# Dependency Management
All dependency versioning is done through `gradle.properties` file.If you want to add a new dependency, put the version in `gradle.properties` and load it in `build.gradle`.
# Runtime Profiles
## local
This profile aims to configure an environment that can be developed even if the network is disconnected.## local-dev
This profile aims configurations that allow me to connect to the DEV environment from my local machine.## dev
This profile exists for deploying Development environments.## staging
This profile exists for deploying Staging environments.## live
This profile exists for deploying Live environments.
# Test Tasks & Tags
## test
This is a collection of test-tasks that we want to run on `CI`.If you want to change the settings, modify the `build.gradle` file.
## unitTest
This is a group of tests that typically have no dependencies, are fast to run, and test a single feature.## contextTest
This is a task that runs with SpringContext and has integration tests.## restDocsTest
This is a task to create asciidoc based on spring-rest-docs.## developTest
This is a task of tests that should not be run in `CI`.This is a good tag to use if you're not good at writing tests.
# Recommended Preferences
## Git Hook
This setting makes run `lint` on every commit.```
$ git config core.hookspath .githooks
```## IntelliJ IDEA
This setting makes it easier to run the `test code` out of the box.```
// Gradle Build and run with IntelliJ IDEA
Build, Execution, Deployment > Build Tools > Gradle > Run tests using > IntelliJ IDEA
```If you want to apply lint settings to the format of IDEA, please refer to the guide below.
[Spring Java Format IntelliJ IDEA](https://github.com/spring-io/spring-javaformat#intellij-idea)
---
# Supported By