Code Monkey home page Code Monkey logo

java9's Introduction

Spring Boot基础

练习描述

本题要求使用Spring boot来完成对Employee CURD(增删改查) API接口的实现。

  • 要求每一个Employee包含 idnameagegender四个字段。

  • 至少需要完成查询所有 Employee 的API接口,并返回一个包含所有Employee的JSON,要求接口路径:http://localhost:8080/employees

  • 要求使用Postman来向目标接口路径发送请求,获取Response,Response JSON格式如下:

      [
        {
          "id": 0,
          "name": "小明",
          "age": 20,
          "gender": ""
        },
        {
          "id": 1,
          "name": "小红",
          "age": 19,
          "gender": ""  
        },
        {
          "id": 2,
          "name": "小智",
          "age": 15,
          "gender": ""
        },
        {
          "id": 3,
          "name": "小刚",
          "age": 16,
          "gender": ""
        },
        {
          "id": 4,
          "name": "小霞",
          "age": 15,
          "gender": ""
        }
      ]
  • 将结果截图,并将图片存放在项目根目录下,截图命名为result.png。例如:

  • 有余力的同学可以尝试完成对Employee的 CURD(增删改查) 全部接口

  • 代码通过小步提交,并且每次提交的描述都要有意义

环境描述

  • java8
  • Intellij-IDEA

如何开始

  • 使用如下方式建立Spring boot项目
    • http://start.spring.io/生成一个项目包,并下载下来,解压,开始编码
  • 在项目根目录下使用 ./gradlew bootRun 启动服务器,若出现 Tomcat started on port(s): 8080 (http) 字样,说明项目启动成功。

输出规范

  • 项目根目录下包含 result.png

java9's People

Contributors

ctcxiao avatar recruiting-system avatar

Watchers

James Cloos avatar Fank Sid 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.