# mongodb の image をダウンロード
$ docker pull mongo
# mondodb を起動
$ docker run -p 27017:27017 -d mongo
# spring-boot のサンプルをクローン
$ git clone https://github.com/dinukadev/justiceleague_management_system/tree/master/src/main/java/com/justiceleague/justiceleaguemodule
$ cd justiceleaguemodule
# ビルド
$ mvn clean install
# 実行
$ java -jar target/justiceleaguemodule-0.0.1-SNAPSHOT.jar
# API確認
$ curl -H "Content-Type: application/json" -X POST -d '{"name":"Hatimiti","superPower":"super speed","location":"Central City"}' http://localhost:8080/justiceleague/addMember
More than 5 years have passed since last update.
docker の mongodb イメージを導入して spring-boot から接続する
Last updated at Posted at 2017-08-20
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
00