Code Monkey home page Code Monkey logo

running-information-analysis-system's Introduction

Running Information Analysis Service

This is a service designed in Spring Boot/Data to provide REST APIs for storing/retrieving runner's information in MySQL database.

Download code

git https://github.com/xiayank/RunningInformationAnalysis.git

Start up the database

Go to project folder, start up Mysql docker.

mysql --host=127.0.0.1 --port=3306 --user=root --password=root 

Look up existed database.

show database;

If there is no database called running_information_analysis_db, then create one.

create database running_information_analysis_db;

Quit the mysql.

quit;

Start up Spring Application

Build maven application.

mvn clean install

Run the fat jar.

java -jar target/RunningInformationAnalysisService-1.0.0.0-SNAPSHOT.jar

Test API

1.Import the dummy data using create API

Use Postman to make a POST request with URL:

http://localhost:9000/create

Request Body is in the file dummaydata.txt.
If the response is 200 OK, meaning that this API works.


2.Return all the info using findAllByOrder API

Use Postman to make a GET request with URL:

http://localhost:9000/findAllByOrder

It should return all 7 JSON data with required format. And default page = 0, size = 2.

__

3.Return all the info great than a heart rate using heartRateGreatThan API

Use Postman to make a GET request with URL:

http://localhost:9000/heartRateGreatThan/{a exist heart rate}

4.Return info by a heart rate using heartRateGreatThan API

Use Postman to make a GET request with URL:

http://localhost:9000/heartRate/{a exist heart rate}

5.Delete all info by purge API

Use Postman to make a DELETE request with URL:

    http://localhost:9000/purge

If the response is 200 OK, meanning that all the info have been deleted.

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.