Code Monkey home page Code Monkey logo

cypher-hello-world's Introduction

cypher-hello-world's People

Contributors

dependabot[bot] avatar nemuki avatar

Watchers

 avatar

cypher-hello-world's Issues

No.4 Spring Profilesごとに定数を定義する

  1. APIのResponseを {"message":"Hello $text, $name"} に修正してください
    textの値はapplication.ymlに定義してApplication内で利用してください
  2. spring profilesがdevのときはtextの値を変えてください
    spring profiles が dev 以外の場合の出力: {"message":"Hello my best friend, foo"}
    spring profiles が dev の場合の出力: {"message":"Hello my friend, foo"}

No.1 Hello World API

  1. requestで name を受け取り、例の通りのResponseをJsonで返却してください。
    例: {"message":"Hello, $name"}
  2. Spring Initializrを利用して作成してください。ブラウザでDownloadしてもIDEの機能を利用してもOKです
  3. Project名称はお好きなもので

No.6 その他

  1. プロジェクトのKotlin formatをKotlin Code Styleにしてください (gradle.propertiesの設定)
  2. graceful shutdown対応をしてください
  3. healthcheck対応をしてください

No.2 Exception 対応

  1. 設定していないPathにリクエストが来たときにHTTP Status 404でResponseをJsonで返却してください。
    例: {"reason":"no handler found"}
  2. Applicationで例外が発生した際、HTTP Status 500でJsonを返却してください。
    例: {"reason":"something wrong ;-("}

No.3 Validation

  1. nameに「3文字以上10文字以内」のValidationを設定する
  2. ValidationExceptionが発生した際、HTTP Status 400でResponseをJsonで返却してください。
    例: {"reason":"invalid parameter: detail: [[hello.name](http://hello.name/): 3 から 10 の間のサイズにしてください]"}

No.5 Debug Log

  1. Applicationにdebug logを仕込み、request nameをlog出力してください
  2. 自身の開発パッゲージにのみ設定するようにしてください (他のLibrary, 例えばspringframeworkのdebug logは出力しない)
  3. spring profilesがdevのときにだけdebug logを出力するようにしてください

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.