Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
How to generate form and crud using Spring and React

I want to dynamically generate crud form based on my API.

I am using spring, spring-data-rest and spring-hateoas.

I don't wan't to render react from java.

I was thinking of tweaking /profile and add some meta informations for rendering my form.

Does anyone has an implementation recommandations for me ?

I have seens that some react projects that is similar with what I require client side, but it is not adapted for spring:

https://github.com/mozilla-services/react-jsonschema-form

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Spring Data Rest can return ALPS or JSON Schema, just change the Accept header:

Accept: application/schema+json
GET http://example.com/profile/foos

So, if you have an entity like:

@Entity
@AllArgsConstructor
@NoArgsConstructor
@Getter
public class Foo {
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String owner;

    private String name;
}

You will get a response like:

{
  "title": "Foo",
  "properties": {
    "owner": {
      "title": "Owner",
      "readOnly": false,
      "type": "string"
    },
    "name": {
      "title": "Name",
      "readOnly": false,
      "type": "string"
    }
  },
  "definitions": {},
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema#"
}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!