SPRING-PETCLINIC-GRAPHQL Project Detailed

Source: Internet
Author: User
Tags git clone

Developers familiar with the spring framework are no strangers to their famous spring-petclinic applications. Based on Spring-petclinic, Nils has developed a SPRING-PETCLINIC-GRAPHQL application combining GRAPHQL characteristics, which is explained in detail in this paper.

1. The composition of the SPRING-PETCLINIC-GRAPHQL backend, using Graphql-java implementation of the GRAPHQL API service relies on Graphql-spring-boot software modules, to achieve a combination of spring Boot's GRAPHQL service.
Rely on Graphql-java-tools software module, implement dynamic binding resolver method to Graphqlschema object.
Frontend, GRAPHQL query implemented using REACT Apollo

2. Back-End Code analysis

Structure is very clear layered design: Spring Boot Portal Application package, Org.springframework.samples.petclinic Pojo data class, Org.springframework.samples.petclinic.model Request parsing resolvers class, Org.springframework.samples.petclinic.graphql.resolvers data access interface, Org.springframework.samples.petclinic.repository Data access implementation class (using SPRING-DATA-JPA to access the HSQLDB database by default), ORG.SPRINGFRAMEWORK.SAMPLES.PETCLINIC.REPOSITORY.SPRINGDATAJPA 3. Backend usage
git clone https://github.com/spring-petclinic/spring-petclinic-graphql.git
CD Spring-petclinic-graphql/backend

MVNW Spring-boot:run

Since the front-end Apollo has not been studied, only the GRAPHIQL test can be accessed through the browser, and access to the http://localhost:9977/is available.

Here are two contributions from bloggers to the project.



Reference Links:

Https://github.com/spring-petclinic/spring-petclinic-graphql

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.