├── LICENSE ├── README.md └── article-service ├── .gitignore ├── .tool-versions ├── README.md ├── app ├── build.gradle └── src │ ├── main │ ├── java │ │ └── dev │ │ │ └── huhao │ │ │ └── example │ │ │ └── realworld │ │ │ └── articleservice │ │ │ └── Application.java │ └── resources │ │ └── application.yml │ └── test │ ├── java │ ├── dev │ │ └── huhao │ │ │ └── example │ │ │ └── realworld │ │ │ └── articleservice │ │ │ └── KarateTestController.java │ ├── features │ │ ├── KarateRunnerBase.java │ │ ├── articles │ │ │ ├── ArticlesRunner.java │ │ │ ├── article-get.feature │ │ │ └── articles-post.feature │ │ └── db-restore.feature │ └── karate-config.js │ └── resources │ └── application.yml ├── build.gradle ├── docker-compose.yml ├── domain ├── build.gradle └── src │ ├── main │ ├── java │ │ └── dev │ │ │ └── huhao │ │ │ └── example │ │ │ └── realworld │ │ │ └── articleservice │ │ │ ├── model │ │ │ └── Article.java │ │ │ ├── repository │ │ │ └── ArticleRepository.java │ │ │ └── service │ │ │ ├── ArticleService.java │ │ │ └── exception │ │ │ ├── ArticleExistedException.java │ │ │ └── ArticleNotFoundException.java │ └── resources │ │ ├── application.yml │ │ └── db │ │ └── migration │ │ └── V20210224114725__create_article_table.sql │ └── test │ ├── java │ └── dev │ │ └── huhao │ │ └── example │ │ └── realworld │ │ └── articleservice │ │ ├── repository │ │ ├── ArticleRepositoryTest.java │ │ └── RepositoryTestBase.java │ │ └── service │ │ ├── ArticleServiceTest.java │ │ └── ServiceTestBase.java │ └── resources │ └── application.yml ├── gateway ├── build.gradle └── src │ ├── main │ └── resources │ │ └── application.yml │ └── test │ └── resources │ └── application.yml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── protocol ├── build.gradle └── src │ ├── main │ ├── java │ │ └── dev │ │ │ └── huhao │ │ │ └── example │ │ │ └── realworld │ │ │ └── articleservice │ │ │ └── protocol │ │ │ └── controller │ │ │ ├── ArticleController.java │ │ │ └── request │ │ │ └── ArticleCreateRequest.java │ └── resources │ │ └── application.yml │ └── test │ ├── java │ └── dev │ │ └── huhao │ │ └── example │ │ └── realworld │ │ └── articleservice │ │ └── protocol │ │ └── controller │ │ ├── ArticleControllerTest.java │ │ └── ControllerTestBase.java │ └── resources │ └── application.yml └── settings.gradle /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Implementation Patterns Example for Spring Boot 2 | -------------------------------------------------------------------------------- /article-service/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/.gitignore -------------------------------------------------------------------------------- /article-service/.tool-versions: -------------------------------------------------------------------------------- 1 | java adoptopenjdk-17.0.4+101 2 | gradle 7.3.1 3 | -------------------------------------------------------------------------------- /article-service/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/README.md -------------------------------------------------------------------------------- /article-service/app/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/build.gradle -------------------------------------------------------------------------------- /article-service/app/src/main/java/dev/huhao/example/realworld/articleservice/Application.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/main/java/dev/huhao/example/realworld/articleservice/Application.java -------------------------------------------------------------------------------- /article-service/app/src/main/resources/application.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/main/resources/application.yml -------------------------------------------------------------------------------- /article-service/app/src/test/java/dev/huhao/example/realworld/articleservice/KarateTestController.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/java/dev/huhao/example/realworld/articleservice/KarateTestController.java -------------------------------------------------------------------------------- /article-service/app/src/test/java/features/KarateRunnerBase.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/java/features/KarateRunnerBase.java -------------------------------------------------------------------------------- /article-service/app/src/test/java/features/articles/ArticlesRunner.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/java/features/articles/ArticlesRunner.java -------------------------------------------------------------------------------- /article-service/app/src/test/java/features/articles/article-get.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/java/features/articles/article-get.feature -------------------------------------------------------------------------------- /article-service/app/src/test/java/features/articles/articles-post.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/java/features/articles/articles-post.feature -------------------------------------------------------------------------------- /article-service/app/src/test/java/features/db-restore.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/java/features/db-restore.feature -------------------------------------------------------------------------------- /article-service/app/src/test/java/karate-config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/java/karate-config.js -------------------------------------------------------------------------------- /article-service/app/src/test/resources/application.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/app/src/test/resources/application.yml -------------------------------------------------------------------------------- /article-service/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/build.gradle -------------------------------------------------------------------------------- /article-service/docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/docker-compose.yml -------------------------------------------------------------------------------- /article-service/domain/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/build.gradle -------------------------------------------------------------------------------- /article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/model/Article.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/model/Article.java -------------------------------------------------------------------------------- /article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/repository/ArticleRepository.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/repository/ArticleRepository.java -------------------------------------------------------------------------------- /article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/service/ArticleService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/service/ArticleService.java -------------------------------------------------------------------------------- /article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/service/exception/ArticleExistedException.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/service/exception/ArticleExistedException.java -------------------------------------------------------------------------------- /article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/service/exception/ArticleNotFoundException.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/main/java/dev/huhao/example/realworld/articleservice/service/exception/ArticleNotFoundException.java -------------------------------------------------------------------------------- /article-service/domain/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /article-service/domain/src/main/resources/db/migration/V20210224114725__create_article_table.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/main/resources/db/migration/V20210224114725__create_article_table.sql -------------------------------------------------------------------------------- /article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/repository/ArticleRepositoryTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/repository/ArticleRepositoryTest.java -------------------------------------------------------------------------------- /article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/repository/RepositoryTestBase.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/repository/RepositoryTestBase.java -------------------------------------------------------------------------------- /article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/service/ArticleServiceTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/service/ArticleServiceTest.java -------------------------------------------------------------------------------- /article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/service/ServiceTestBase.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/test/java/dev/huhao/example/realworld/articleservice/service/ServiceTestBase.java -------------------------------------------------------------------------------- /article-service/domain/src/test/resources/application.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/domain/src/test/resources/application.yml -------------------------------------------------------------------------------- /article-service/gateway/build.gradle: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /article-service/gateway/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /article-service/gateway/src/test/resources/application.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /article-service/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /article-service/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /article-service/gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/gradlew -------------------------------------------------------------------------------- /article-service/gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/gradlew.bat -------------------------------------------------------------------------------- /article-service/protocol/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/protocol/build.gradle -------------------------------------------------------------------------------- /article-service/protocol/src/main/java/dev/huhao/example/realworld/articleservice/protocol/controller/ArticleController.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/protocol/src/main/java/dev/huhao/example/realworld/articleservice/protocol/controller/ArticleController.java -------------------------------------------------------------------------------- /article-service/protocol/src/main/java/dev/huhao/example/realworld/articleservice/protocol/controller/request/ArticleCreateRequest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/protocol/src/main/java/dev/huhao/example/realworld/articleservice/protocol/controller/request/ArticleCreateRequest.java -------------------------------------------------------------------------------- /article-service/protocol/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /article-service/protocol/src/test/java/dev/huhao/example/realworld/articleservice/protocol/controller/ArticleControllerTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/protocol/src/test/java/dev/huhao/example/realworld/articleservice/protocol/controller/ArticleControllerTest.java -------------------------------------------------------------------------------- /article-service/protocol/src/test/java/dev/huhao/example/realworld/articleservice/protocol/controller/ControllerTestBase.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/protocol/src/test/java/dev/huhao/example/realworld/articleservice/protocol/controller/ControllerTestBase.java -------------------------------------------------------------------------------- /article-service/protocol/src/test/resources/application.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /article-service/settings.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/howiehu/implementation-patterns-spring/HEAD/article-service/settings.gradle --------------------------------------------------------------------------------