From 4da43de4f6f2a67ad512ced0bedc38f79a0eab23 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Wed, 6 May 2020 16:46:11 +0200 Subject: [PATCH 1/2] Add DTO / DAO description --- backend/src/main/java/de/hft/geotime/record/TimeRecord.java | 2 +- .../de/hft/geotime/timetrackaccount/TimetrackAccount.java | 2 +- .../src/main/java/de/hft/geotime/user/TimetrackUser.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java b/backend/src/main/java/de/hft/geotime/record/TimeRecord.java index 3280d37..6e7293a 100644 --- a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java +++ b/backend/src/main/java/de/hft/geotime/record/TimeRecord.java @@ -20,7 +20,7 @@ public class TimeRecord { @Id private long id; @OneToOne - private TimetrackAccount account; + private TimetrackAccount account; // TimetrackAccount ID (Lazy) private Date startdate; private Date enddate; private Duration time; diff --git a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java b/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java index 772e6ec..4d0c8e1 100644 --- a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java +++ b/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java @@ -17,7 +17,7 @@ public class TimetrackAccount { @GeneratedValue(strategy = GenerationType.AUTO) private long id; @OneToOne - private TimetrackUser timetrackUser; + private TimetrackUser timetrackUser; // TimetrackUser Id (Lazy) [REMOVE] private double revenue; private String name; private String description; diff --git a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java b/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java index aebd202..47f85df 100644 --- a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java +++ b/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java @@ -21,12 +21,12 @@ public class TimetrackUser { private long id; @UniqueElements private String username; - private String password; + private String password; // strip private String firstname; private String lastname; @OneToOne - private Role role; + private Role role; // Projection (String) @OneToMany - private List timetrackAccounts; + private List timetrackAccounts; // Lazy List } From 5afa5daece3715ab37d8cd157f2a398b6fbe342b Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Sat, 9 May 2020 17:57:33 +0200 Subject: [PATCH 2/2] Change backend port from 80 to 5000 everywhere --- backend/Dockerfile | 2 +- backend/src/main/resources/application.properties | 2 +- docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 6af43f6..56f8316 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -6,5 +6,5 @@ RUN ["gradle", "bootJar"] FROM openjdk:11-jre-slim WORKDIR /root COPY --from=build /root/build/libs/*.jar app.jar -EXPOSE 80 +EXPOSE 5000 ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index fb71f70..5a68d62 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -1,4 +1,4 @@ -server.port=80 +server.port=5000 spring.datasource.hikari.initialization-fail-timeout=0 spring.datasource.hikari.max-lifetime=300000 spring.jpa.show-sql=true diff --git a/docker-compose.yml b/docker-compose.yml index a4392b7..ccd86b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: build: context: ./backend ports: - - "5000:80" + - "5000:5000" depends_on: - db