Skip to content

RaynorOnGitHub/spring-boot-mongodb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-mongodb-example

This repository contains a Spring Boot example project for MongoDB.

For a code review of this repo, see my related blog post.

You can learn more about my (John Thompson - Springframework Guru) courses here on my site.

Java 17 LTS / spring-boot 2.6.6 / bootstrap 4.6.1 / jquery 3.6.0 / single module version ...

Docker MongoDB Container

  1. Run/prepare docker image and container

docker run -p 27017:27017 --name spring-mongo -d mongo:5.0.7

  1. Start MongoDB console in interactive mode (if you need it)

docker exec -it spring-mongo mongosh

Spring-Boot-Application

  • Start application with maven target sequence clean then package or install and spring-boot:start or spring-boot:run

  • Open web-app inside a browser on localhost and port 8080

  • Stop application when needed with maven target spring-boot:stop

About

Docker MongoDB with spring-boot and simple thymeleaf/bootstrap UI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 58.0%
  • HTML 42.0%