From e29ec06e46f325549b469d85bcbab9171a737381 Mon Sep 17 00:00:00 2001 From: Pepe Ronin Date: Fri, 12 Sep 2025 17:58:46 +0300 Subject: [PATCH 01/25] refactor: create separate modules and bootstrap configs --- core/comment-service/pom.xml | 21 +++++++++++++++++++ core/pom.xml | 3 +++ core/request-service/pom.xml | 21 +++++++++++++++++++ core/user-service/pom.xml | 20 ++++++++++++++++++ .../config/comment-service/application.yaml | 2 ++ .../config/request-service/application.yaml | 2 ++ .../config/user-service/application.yaml | 2 ++ 7 files changed, 71 insertions(+) create mode 100644 core/comment-service/pom.xml create mode 100644 core/request-service/pom.xml create mode 100644 core/user-service/pom.xml create mode 100644 infra/config-server/src/main/resources/config/comment-service/application.yaml create mode 100644 infra/config-server/src/main/resources/config/request-service/application.yaml create mode 100644 infra/config-server/src/main/resources/config/user-service/application.yaml diff --git a/core/comment-service/pom.xml b/core/comment-service/pom.xml new file mode 100644 index 0000000..9198b47 --- /dev/null +++ b/core/comment-service/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + ru.practicum + explore-with-me + 0.0.1-SNAPSHOT + ../../pom.xml + + + comment-service + + + 21 + 21 + UTF-8 + + + \ No newline at end of file diff --git a/core/pom.xml b/core/pom.xml index 7d7ae9c..d729e7b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -22,6 +22,9 @@ main-service stats-service ewm-common + user-service + request-service + comment-service \ No newline at end of file diff --git a/core/request-service/pom.xml b/core/request-service/pom.xml new file mode 100644 index 0000000..bfd7731 --- /dev/null +++ b/core/request-service/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + ru.practicum + explore-with-me + 0.0.1-SNAPSHOT + ../../pom.xml + + + request-service + + + 21 + 21 + UTF-8 + + + \ No newline at end of file diff --git a/core/user-service/pom.xml b/core/user-service/pom.xml new file mode 100644 index 0000000..5194fb9 --- /dev/null +++ b/core/user-service/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + ru.practicum + core + 0.0.1-SNAPSHOT + + + user-service + + + 21 + 21 + UTF-8 + + + \ No newline at end of file diff --git a/infra/config-server/src/main/resources/config/comment-service/application.yaml b/infra/config-server/src/main/resources/config/comment-service/application.yaml new file mode 100644 index 0000000..46eac2f --- /dev/null +++ b/infra/config-server/src/main/resources/config/comment-service/application.yaml @@ -0,0 +1,2 @@ +server: + port: 0 \ No newline at end of file diff --git a/infra/config-server/src/main/resources/config/request-service/application.yaml b/infra/config-server/src/main/resources/config/request-service/application.yaml new file mode 100644 index 0000000..46eac2f --- /dev/null +++ b/infra/config-server/src/main/resources/config/request-service/application.yaml @@ -0,0 +1,2 @@ +server: + port: 0 \ No newline at end of file diff --git a/infra/config-server/src/main/resources/config/user-service/application.yaml b/infra/config-server/src/main/resources/config/user-service/application.yaml new file mode 100644 index 0000000..46eac2f --- /dev/null +++ b/infra/config-server/src/main/resources/config/user-service/application.yaml @@ -0,0 +1,2 @@ +server: + port: 0 \ No newline at end of file From af222e2e2a29818d5cb7d8b2e56ab58ba3d8c4b2 Mon Sep 17 00:00:00 2001 From: Pepe Ronin Date: Fri, 12 Sep 2025 21:12:47 +0300 Subject: [PATCH 02/25] refactor: update datasource configuration --- .run/main-local.run.xml | 6 +- .run/stats-local.run.xml | 6 +- core/user-service/pom.xml | 81 +++++++++++++++++++ .../user/UserServiceApplication.java | 5 ++ .../config/application-postgres.yaml | 15 ++-- .../main-service/application-local.yaml | 8 -- .../config/main-service/application.yaml | 4 +- .../stats-server/application-local.yaml | 5 -- .../config/stats-server/application.yaml | 4 +- init-scripts/init.sql | 11 +++ postgres.yml | 18 +++++ 11 files changed, 131 insertions(+), 32 deletions(-) create mode 100644 core/user-service/src/main/java/ru/practicum/explorewithme/user/UserServiceApplication.java create mode 100644 init-scripts/init.sql create mode 100644 postgres.yml diff --git a/.run/main-local.run.xml b/.run/main-local.run.xml index 33b0c90..c143438 100644 --- a/.run/main-local.run.xml +++ b/.run/main-local.run.xml @@ -4,9 +4,7 @@