illyasviel / elide-spring-boot

Elide Spring-Boot-Starter will help you use Elide with Spring Boot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elide integration with Spring Boot

Build Status Coverage Status License Maven Central

🎉 Now, Elide has official support for Spring, please check out Elide Spring Artifacts. 🎉

Elide Spring-Boot-Starter will help you use Elide with Spring Boot

  • Automatically configure elide and json:api/GraphQL controller.
  • Integrated Spring Transaction.
  • Integrated Spring Dependency Injection (optional).
  • A convenience annotation, @ElideCheck("expression"), help you register elide check.
  • A convenience annotation, @ElideHook(lifeCycle = OnXXX.class), help you register elide function hook.
  • Catch org.hibernate.exception.ConstraintViolationException return HTTP 422.

Usage

<dependency>
  <groupId>org.illyasviel.elide</groupId>
  <artifactId>elide-spring-boot-starter</artifactId>
  <version>1.4.0</version>
</dependency>

The GraphQL auto configuration takes effect when elide-graphql on the classpath.

<dependency>
  <groupId>com.yahoo.elide</groupId>
  <artifactId>elide-graphql</artifactId>
  <version>${elide.version}</version>
</dependency>

Example

Check out the elide-spring-boot-sample.

Configuration

The following shows all the default properties.

elide:
  prefix: "/api"
  default-page-size: 20
  max-page-size: 100
  spring-dependency-injection: true
  return-error-objects: false
  mvc:
    enable: true
    get: true
    post: true
    patch: true
    delete: true
    graphql: true

About

Elide Spring-Boot-Starter will help you use Elide with Spring Boot

License:Apache License 2.0


Languages

Language:Java 100.0%