Install docker mongodb image and connect from spring-boot

https://www.javacodegeeks.com/2017/07/spring-boot-justice-league.html

#Download mongodb image
$ docker pull mongo

#Start mongodb
$ docker run -p 27017:27017 -d mongo

# spring-Clone boot sample
$ git clone https://github.com/dinukadev/justiceleague_management_system/tree/master/src/main/java/com/justiceleague/justiceleaguemodule

$ cd justiceleaguemodule

#Build
$ mvn clean install

#Run
$ java -jar target/justiceleaguemodule-0.0.1-SNAPSHOT.jar

#API confirmation
$ curl -H "Content-Type: application/json" -X POST -d '{"name":"Hatimiti","superPower":"super speed","location":"Central City"}' http://localhost:8080/justiceleague/addMember

reference

Recommended Posts

Install docker mongodb image and connect from spring-boot
Compile and install Git from source.
Install MongoDB on Ubuntu 16.04 and operate via python
Install from conda-forge
Docker MongoDB mongo-express
Install and develop Git, VSCode, Docker on Chrome OS
Install Docker on Arch Linux and run it remotely
Build a Docker container and save png from altair