Kotlin、Spring Boot 和 GraphQL 示例项目

Kotlin、Spring Boot 和 GraphQL 示例项目

这个项目展示了如何使用 Kotlin、Spring Boot 和 Gradle 构建一个带有简单 CRUD 功能的 GraphQL API。项目包含两个示例 CRUD 操作,演示了如何使用 GraphQL 进行数据操作。

你可以选择以下方式运行项目:

  • 使用 Gradle 构建并运行:
    使用 gradle bootRun 命令直接启动应用程序。
  • 构建 Docker 镜像:
    构建 Docker 镜像并运行容器,从而在隔离环境中运行应用程序。

应用程序启动时会自动启动一个嵌入式 H2 数据库,无需额外配置数据库依赖。启动后,你可以通过 http://localhost:PORTA_INICIADA/ 访问 GraphQL API。

zip
example-kotlin-springboot-graphql-master.zip 预估大小:43个文件
folder
example-kotlin-springboot-graphql-master 文件夹
file
.gitignore 296B
file
Dockerfile 432B
file
settings.gradle 55B
file
sonar-project.properties 943B
file
build.gradle 2KB
folder
src 文件夹
folder
main 文件夹
folder
kotlin 文件夹
folder
com 文件夹
folder
andrejusti 文件夹
folder
example 文件夹
folder
kotlin 文件夹
folder
springboot 文件夹
folder
graphql 文件夹
folder
domain 文件夹
folder
entity 文件夹
file
Category.kt 265B
file
Product.kt 586B
folder
repository 文件夹
folder
api 文件夹
file
CategoryRepository.kt 479B
file
ProductRepository.kt 522B
folder
controller 文件夹
folder
graphql 文件夹
folder
resolver 文件夹
file
CategoryGraphQlResolver.kt 1KB
file
ProductGraphQlResolver.kt 2KB
folder
config 文件夹
file
CustomGraphQlErrorHandler.kt 2KB
folder
service 文件夹
file
CategoryService.kt 3KB
file
ProductService.kt 4KB
folder
infrastructure 文件夹
folder
dto 文件夹
file
Pagination.kt 168B
file
ItemValidationError.kt 229B
folder
exception 文件夹
file
ValidationException.kt 283B
file
package-info.java 492B
folder
service 文件夹
file
PaginationService.kt 1KB
file
ValidateService.kt 2KB
file
Application.kt 289B
folder
resources 文件夹
folder
graphql 文件夹
file
mutations.graphqls 460B
file
querys.graphqls 341B
file
types.graphqls 163B
file
inputs.graphqls 203B
folder
db 文件夹
folder
changelog 文件夹
file
db.changelog-master.yaml 2KB
file
application.yml 586B
file
banner.txt 2KB
folder
test 文件夹
folder
kotlin 文件夹
folder
com 文件夹
folder
andrejusti 文件夹
folder
example 文件夹
folder
kotlin 文件夹
folder
springboot 文件夹
folder
graphql 文件夹
folder
domain 文件夹
folder
it 文件夹
file
ProductIT.kt 9KB
file
CategoryIT.kt 7KB
file
AbstractIT.kt 1KB
folder
sdk 文件夹
file
AbstractSdk.kt 3KB
file
ProductSdk.kt 4KB
file
CategorySdk.kt 2KB
file
.travis.yml 541B
file
gradlew 5KB
file
LICENSE 1KB
file
README.md 18KB
folder
gradle 文件夹
folder
wrapper 文件夹
file
gradle-wrapper.properties 232B
file
gradle-wrapper.jar 53KB
folder
docs 文件夹
folder
images 文件夹
file
graphiql.gif 118KB
file
h2-console.gif 101KB
file
voyager.gif 131KB
...
zip 文件大小:438.81KB