Spring Boot Starter
A highly opinionated and complete starter for Spring Boot production ready projects.
Running Instance on Heroku
https://spring-boot-starter.ericopoku.com/

Test Coverage

Built With
Building and profiling
Use JDK 26 and the checked-in Gradle 9.7.1 wrapper:
./gradlew clean build --refresh-dependencies --warning-mode all
The build runs unit and integration tests. Hibernate’s local second-level cache uses
Caffeine through JCache. The test JVMs load Mockito as an explicit Java agent and
turn off class-data sharing because Mockito instruments bootstrap classes. They also
allow the final-field mutation used by Spring Security’s CSRF test helper.
These JVM options apply only to tests. S3 tests use Adobe S3Mock 5 in an isolated
Spring context.
The build checks formatting without rewriting source files. Run ./gradlew spotlessApply
to apply formatting fixes.
Hypersistence Optimizer is optional. The bundled 2.6.3 JAR targets older Hibernate
APIs and is incompatible with this application’s Hibernate 7 version. To enable
profiling, supply a licensed JAR compatible with the resolved Hibernate version:
./gradlew bootRun -PhypersistenceOptimizerJar=/absolute/path/to/compatible-optimizer.jar
Features
Sample ongoing project using this template
Entity Relational Diagram (ERD)

Production Ready Folder Structure
.
├── config # Can hold project level configurations like pmd, checkstyle, etc.
├── documents # Holds project documentations. Markdown sections, etc.
│ └── images
├── libs # Holds special libraries used by the application.
│ └── newrelic
└── src
├── integrationTest # Integration test suites separated from unit tests.
│ ├── java
│ │ └── com
│ │ └── developersboard
│ │ ├── backend
│ │ ├── task
│ │ └── web
│ └── resources
├── main
│ ├── java
│ │ └── com
│ │ └── developersboard
│ │ ├── annotation # All custom annotations used in the application
│ │ ├── backend # Business Logic and Data Access implementation
│ │ ├── config # Configuration classes and properties
│ │ ├── constant # Constants used in the application
│ │ ├── enums # Enums used in the application
│ │ ├── exception # Custom exceptions used in the application
│ │ ├── shared # Resources like dto, utils, etc. used in the application
│ │ ├── task # Scheduled tasks and cron jobs used in the application
│ │ └── web # Web layer implementation
│ ├── resources
│ │ ├── i18n # I18n property files, comes with 'en', 'fr', 'es' and 'zn_CN'
│ │ ├── static
│ │ │ ├── css
│ │ │ ├── fonts
│ │ │ ├── images
│ │ │ └── js
│ │ │ └── form-validation
│ │ └── templates
│ │ ├── common
│ │ │ └── email
│ │ ├── email
│ │ ├── error
│ │ └── user
│ └── scripts # Scripts used in the application as part of docker build, etc.
└── test
├── java
│ └── com
│ └── developersboard
│ ├── backend
│ ├── config
│ ├── shared
│ └── web
└── resources
Configuration properties required to deploy to Heroku:

Contributing
Please read CONTRIBUTING.md
for details on our code of conduct, and the process for submitting pull requests to us.
Credit
TBD
Authors
- Eric Opoku - Initial work
- George Anguah - Initial work
- Matthew Puentes - Initial work
- Stephen Boakye - Contributor
- Charles Dimbeng - Contributor
- Simon Kodua - Contributor
Acknowledgments
Notes
- The following environment variables can be customized as necessary.:
-
The defaults are:
ADMIN_USERNAME=admin
ADMIN_PASSWORD=password
ENCRYPTION_SECRET_SALT=salt
ENCRYPTION_SECRET_PASSWORD=password
JWT_SECRET=salt
SPRING_PROFILES_ACTIVE=dev
ACCESS_TOKEN_EXPIRATION_IN_MINUTES=5
-
The AWS Properties and defaults are:
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_S3_BUCKET_NAME=spring-boot-starter
-
The Email Properties and defaults are:
EMAIL_PROTOCOL=smtp
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USERNAME
EMAIL_PASSWORD # If using gmail, this must be a 2 step verification enabled app password
- The profiles defined in the application are development, test,
integration-test, integration-test-ci, and production to test out production
functionalities.
- Datasource must be provided for production profile for the application to run.
NB: Windows users must use gradlew instead of ./gradlew
Running on Docker (Assuming docker is installed)
- in the directory where docker-compose.yml file resides, simply run the command - docker-compose
up
Stop running application on Docker
- in the directory where docker-compose.yml file resides, simply run the command - docker-compose
down
评论