Coder Social home page Coder Social logo

currencyprice's Introduction

CurrencyPrice

A java project use JPA & UnitTest, base on SpringBoot.

Environments

  • JDK: 1.8
  • SpringBoot: 2.7.2
application.properties

Change these properties to direct your h2 db or others.

./src/main/resources/application.yml

spring:
  h2:
    console:
      enabled: true
  datasource:s
    url: jdbc:h2:mem:dbtest
    driver-class-name: org.h2.Driver
    username: root
    password:

H2 Schema

CREATE TABLE CURRENCY_PRICE(
    ID INTEGER PRIMARY KEY AUTO_INCREMENT,
    CODE VARCHAR(3) NOT NULL DEFAULT '',
    SYMBOL VARCHAR(10) NOT NULL DEFAULT '',
    DESCRIPTION VARCHAR(255),
    RATE DECFLOAT(10) NOT NULL DEFAULT 0,
    CREATE_TIME TIMESTAMP NOT NULL DEFAULT Currency_TIMESTAMP,
    UPDATE_TIME TIMESTAMP NOT NULL DEFAULT Currency_TIMESTAMP,
    IS_SUSPEND VARCHAR(3) NOT NULL DEFAULT ''
);

CREATE TABLE CURRENCY_PRICE_CHINESE_NAME(
    ID INTEGER PRIMARY KEY AUTO_INCREMENT,
    CHINESE_CODE VARCHAR(10) NOT NULL DEFAULT '',
    CODE VARCHAR(3) NOT NULL DEFAULT '',
    RATE DECFLOAT(10) NOT NULL DEFAULT 0
);


CREATE INDEX IDX_CURRENCY_SYMBOL ON CURRENCY_PRICE(SYMBOL);

INSERT INTO CURRENCY VALUES(1, 'USD', '$', 'default', 28.3, '2022-03-28 09:00:00.000', '2022-03-28 09:00:00.000', 'N');
INSERT INTO CURRENCY VALUES(2, 'USA', '@', 'default', 5.432101234, '2022-03-28 09:00:00.000', '2022-03-28 09:00:00.000', 'N');






CREATE SEQUENCE CHRIS_CURRENCY_SEQUENCE START WITH 3 INCREMENT BY 1;

The Script for Postman

Create environment parameter base_url before use.

# import file
{baseDir}/CallCoinDeskAPI/src/main/resources/CoinDesk.postman_collection.json
API Logic
  • api.coindesk
  • getAllInfo
  • getDataById
  • insertData
  • updateData
  • deleteData
  • callCoinDesk

Feature

  • New API: getCurrencyList
  • AOP manage controller's exceptions
  • LoadingCache(?
  • add ActionHistoryLog
  • H2 in memory while testing

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.