Git Product home page Git Product logo

springboot-api-sandbox's Introduction

springboot-api-sandbox

About

SpringBoot + Kotlin でのサーバーサイドDDDの素振り
商品を管理する RESTful API

Frontend - nuxt-frontend-sandbox

Technology

  • 言語 - Kotlin 1.2.71
  • フレームワーク - Spring Boot 2.1.7
  • ビルドツール - Gradle
  • DB - MySQL 5.7
  • ORM - Spring Data JPA
  • 開発環境 - Docker docker-compose
  • ユニットテスト - MockK 1.9

Getting Started

  • サービスの起動
$ docker-compose up -d
  • アプリケーションの起動
$ ./start-server.sh

http://localhost:7070

  • サービスの停止
$ docker-compose down

Utility Commands

  • データベースログイン
$ ./mysql.sh
Enter password: password
mysql> use goods_manager_db;
  • データベース初期化
# DB削除
$ rm -rf docker/db/mysql_data

# サービス再起動(DB再生成)
$ ./stop-docker.sh && ./start-docker.sh
  • ER図(データベース定義書)生成
# SchemaSpy
$ ./generate-er.sh

API List

リクエスト メソッド URL
商品全件取得 GET /app/goods
商品詳細取得 GET /app/goods/:id
商品名部分一致検索 GET /app/goods/search
商品登録 POST /app/goods
商品情報更新 PUT /app/goods/:id
商品削除 DELETE /app/goods/:id
ユーザー登録 POST /app/user
ログイン PUT /app/user/login
ログアウト PUT /app/user/logout

Database

データベース名 goods_manager_db

テーブル物理名 論理名
goods 商品
user ユーザー
aggregation 統計(アクセス集計)

Package Architecture

src/main/kotlin/com/kotatanaka/goodsapi
├── GoodsApiKotlinApplication.kt
├── app
│   ├── aop
│   ├── batch
│   ├── controller
│   ├── filter
│   └── handler
├── config
├── domain
│   ├── dto
│   │   ├── request
│   │   └── response
│   ├── entity
│   ├── enums
│   ├── exception
│   ├── repository
│   └── service
├── factory
├── util
└── validation
    └── validator

springboot-api-sandbox's People

Contributors

kotatanaka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.