From 3aed9456e6482dc638cc989a24f68e64668c6176 Mon Sep 17 00:00:00 2001 From: bekodeg Date: Tue, 21 May 2024 15:45:29 +0400 Subject: [PATCH] =?UTF-8?q?3=20=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/build.gradle | 6 ++++++ .../main/java/com/example/demo/core/config/Constants.java | 2 +- .../com/example/demo/games/repository/GameRepository.java | 7 ++----- .../example/demo/tables/repository/TableRepository.java | 6 ++---- .../com/example/demo/users/repository/UserRepository.java | 7 ++----- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/demo/build.gradle b/demo/build.gradle index edd4116..3be5b78 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -22,8 +22,14 @@ ext { dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.modulith:spring-modulith-starter-core' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.4.0' + implementation 'org.modelmapper:modelmapper:3.1.1' + + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'com.h2database:h2:2.2.224' + testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.modulith:spring-modulith-starter-test' } diff --git a/demo/src/main/java/com/example/demo/core/config/Constants.java b/demo/src/main/java/com/example/demo/core/config/Constants.java index 6efe2d1..c62b4c9 100644 --- a/demo/src/main/java/com/example/demo/core/config/Constants.java +++ b/demo/src/main/java/com/example/demo/core/config/Constants.java @@ -1,5 +1,5 @@ package com.example.demo.core.config; public class Constants { - public static final String API_URL = "/api_2"; + public static final String API_URL = "/api_3"; } diff --git a/demo/src/main/java/com/example/demo/games/repository/GameRepository.java b/demo/src/main/java/com/example/demo/games/repository/GameRepository.java index 3755849..c09c98b 100644 --- a/demo/src/main/java/com/example/demo/games/repository/GameRepository.java +++ b/demo/src/main/java/com/example/demo/games/repository/GameRepository.java @@ -1,10 +1,7 @@ package com.example.demo.games.repository; - -import com.example.demo.core.repository.MapRepository; import com.example.demo.games.model.GameEntity; -import org.springframework.stereotype.Repository; +import org.springframework.data.repository.CrudRepository; -@Repository -public class GameRepository extends MapRepository { +public interface GameRepository extends CrudRepository { } diff --git a/demo/src/main/java/com/example/demo/tables/repository/TableRepository.java b/demo/src/main/java/com/example/demo/tables/repository/TableRepository.java index c03acab..6d7bfa9 100644 --- a/demo/src/main/java/com/example/demo/tables/repository/TableRepository.java +++ b/demo/src/main/java/com/example/demo/tables/repository/TableRepository.java @@ -1,10 +1,8 @@ package com.example.demo.tables.repository; -import com.example.demo.core.repository.MapRepository; import com.example.demo.tables.model.TableEntity; -import org.springframework.stereotype.Repository; +import org.springframework.data.repository.CrudRepository; -@Repository -public class TableRepository extends MapRepository { +public interface TableRepository extends CrudRepository { } diff --git a/demo/src/main/java/com/example/demo/users/repository/UserRepository.java b/demo/src/main/java/com/example/demo/users/repository/UserRepository.java index ac2ef22..49d2fd9 100644 --- a/demo/src/main/java/com/example/demo/users/repository/UserRepository.java +++ b/demo/src/main/java/com/example/demo/users/repository/UserRepository.java @@ -1,10 +1,7 @@ package com.example.demo.users.repository; -import com.example.demo.core.repository.MapRepository; import com.example.demo.users.model.UserEntity; -import org.springframework.stereotype.Repository; - -@Repository -public class UserRepository extends MapRepository { +import org.springframework.data.repository.CrudRepository; +public interface UserRepository extends CrudRepository { }