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 { }