forked from hxt001/booking-system-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hxt001#5 from tabriszhu913/main
Version 2
- Loading branch information
Showing
41 changed files
with
933 additions
and
3,073 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: push | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
# workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: gradle | ||
|
||
- name: Set up docker | ||
uses: docker-practice/actions-setup-docker@master | ||
|
||
- name: Test backend | ||
run: | | ||
cd backend | ||
./gradlew test | ||
- name: Build backend image | ||
run: | | ||
cd backend | ||
./gradlew bootJar | ||
docker build -t backend . | ||
- name: Set up Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 'lts/erbium' | ||
|
||
- name: Build frontend image | ||
run: | | ||
cd booking-system-ui | ||
npm install | ||
npm run build | ||
docker build -t frontend . | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Mac | ||
.DS_Store | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM openjdk:11-jdk-slim | ||
ARG JAR_FILE=build/libs/*.jar | ||
ADD ${JAR_FILE} app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
backend/src/main/java/com/pivottech/booking/CrosConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
backend/src/main/java/com/pivottech/booking/controller/HelloWorldController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
package com.pivottech.booking.controller; | ||
|
||
import com.pivottech.booking.intercepter.TodaysDate; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.time.LocalDate; | ||
|
||
@RestController | ||
public class HelloWorldController { | ||
|
||
@GetMapping("/") | ||
public String index() { | ||
return "Hello World!2"; | ||
} | ||
@GetMapping("/") | ||
public String index() { | ||
return "Hello World!2"; | ||
} | ||
|
||
@GetMapping("todaysDate") | ||
public String todaysDate(@TodaysDate LocalDate todaysDate) { | ||
return todaysDate.toString(); | ||
} | ||
} |
Oops, something went wrong.