Skip to content

About

πŸš€ Beginner-friendly Java Spring Boot starter template to kickstart your projects with clean, ready-to-use structure.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

Β 

History

12 Commits

Folders and files

Repository files navigation

Spring Boot + MongoDB REST API Starter

A clean starter template for building a REST API with Java 21, Spring Boot 3.3.5, MongoDB, Spring Security, JWT and Swagger/OpenAPI.

Stack

  • Java 21
  • Spring Boot 3.3.5
  • Spring Web
  • Spring Security
  • Spring Data MongoDB
  • JJWT 0.11.5
  • SpringDoc OpenAPI
  • Lombok
  • Gradle

Requirements

  • JDK 21+
  • MongoDB 6+
  • Gradle 8+ (or the included Gradle wrapper, when present)

Run

git clone https://github.com/vsmm-world/spring-boot-3.3.5-starting-template.git
cd spring-boot-3.3.5-starting-template
./gradlew clean build
./gradlew bootRun

On Windows PowerShell use gradlew.bat clean build and gradlew.bat bootRun.

Configuration

Create src/main/resources/application.properties from the example configuration and set your MongoDB connection and JWT secret. Never commit production secrets.

API documentation

When the application is running, Swagger UI is available at:

http://localhost:8080/swagger-ui/index.html

Project structure

src/main/java/
β”œβ”€β”€ config/
β”œβ”€β”€ controller/
β”œβ”€β”€ model/
β”œβ”€β”€ repository/
β”œβ”€β”€ service/
β”œβ”€β”€ security/
└── Application.java

Testing

./gradlew test

Security note

Use a strong, environment-specific JWT secret. Keep credentials out of Git and use environment variables or a secrets manager for deployed environments.

Author

Ravindra Valand (RV)
GitHub: https://github.com/vsmm-world

License

MIT

About

πŸš€ Beginner-friendly Java Spring Boot starter template to kickstart your projects with clean, ready-to-use structure.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages