diff --git a/.classpath b/.classpath index d575057..6fd6b4f 100644 --- a/.classpath +++ b/.classpath @@ -18,15 +18,11 @@ - - - - - + diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0e3dc4b..e855b3f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Maven +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: Java CI with Maven @@ -16,10 +16,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: '17' + distribution: 'adopt' + cache: maven server-id: github server-username: GITHUB_USER_REF server-password: GITHUB_TOKEN_REF @@ -27,4 +29,4 @@ jobs: env: GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} - run: mvn clean install -s settings.xml -B package --file pom.xml -X \ No newline at end of file + run: mvn -s settings.xml -B package --file pom.xml diff --git a/README.md b/README.md index 19fbd91..41da75f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Java-Matching-Engine REST API -![Java CI with Maven](https://github.com/Laffini/Java-Matching-Engine/workflows/Java%20CI%20with%20Maven/badge.svg) +![Java CI with Maven](https://github.com/Laffini/Java-Matching-Engine-REST-API/workflows/Java%20CI%20with%20Maven/badge.svg) A matching engine written in Java. @@ -42,10 +42,10 @@ User A creates a buy order of 2 items (e.g. 2 shares, 2 bitcoin, etc) with a pri ##### Request ``` -POST /order/ - ?side=BUY - &amount=2 - &price=5 +POST /api/v1/order/ + ?side=BUY + &amount=2 + &price=5 ``` ##### Response @@ -67,10 +67,10 @@ User B creates a sell order of 2 items with a price of 5. ##### Request ``` -POST /order/ - ?side=SELL - &amount=2 - &price=5 +POST api/v1//order/ + ?side=SELL + &amount=2 + &price=5 ``` ##### Response diff --git a/pom.xml b/pom.xml index b4259b1..571f108 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ rest-api Rest API for the Java Matching Engine - 1.8 + 17 @@ -34,11 +34,11 @@ GitHub OWNER Apache Maven Packages https://maven.pkg.github.com/Laffini/Java-Matching-Engine-Core - true - - - true - + true + + + true + @@ -48,7 +48,6 @@ net.laffyco.java-matching-engine core 0.0.1-SNAPSHOT - compile org.springframework.boot @@ -70,8 +69,8 @@ - org.springframework.boot - spring-boot-maven-plugin + org.apache.maven.plugins + maven-surefire-plugin diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java index 3d3b488..071ae08 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/OrderController.java @@ -25,7 +25,7 @@ * */ @RestController -@RequestMapping("/order") +@RequestMapping("/api/v1/order") public class OrderController { /** diff --git a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java index 0ee5f3b..de6e598 100644 --- a/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java +++ b/src/main/java/net/laffyco/javamatchingengine/restapi/controllers/SpreadController.java @@ -16,7 +16,7 @@ * */ @RestController -@RequestMapping("/spread") +@RequestMapping("/api/v1/spread") public class SpreadController { /**