Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda