Questions tagged [spring-data-rest]

Spring Data REST (SDR) is a Spring Data project that aims to make it easy to expose Spring Data repositories as REST services. SDR use Spring HATEOAS internally to create HAL response.

2228 questions
0
votes
0 answers

Can I use Method Security on Spring Rest Repository methods?

Let CountryRepo be a Spring RepositoryRestResource @RepositoryRestResource public interface CountryRepo implements CrudRepository { } for a simple Country domain with country code and common name. Can I override the methods and…
TMOTTM
  • 3,286
  • 6
  • 32
  • 63
0
votes
0 answers

Spring Data Rest - Manage child entities when only parent has a repository

I have a Spring backend that is using Spring Data Rest. I have a One-To-Many relation where the parent has its own repository but the children don't. I've chosen to do it this way because the child class is rather small and I would want to avoid…
Krisztian
  • 373
  • 1
  • 3
  • 15
0
votes
0 answers

spring-data-rest @ManyToMany

I am working on a spring-data-rest module, but there is a problem in the query process: I defined the roles attribute in the User class, added @ManyToMany annotation, and printed relevant sql about the Role during execution, but there was no…
0
votes
1 answer

ConverterNotFoundException: No converter found capable of converting from type [org.bson.types.Binary] to type [java.util.UUID]

I have a small standard Spring Boot microservice which is Spring Data REST for a single Mongo DB collection. The document contains the UUID field. The collection is a capped collection due to requirements. Now I can build and run the app locally on…
0
votes
1 answer

Why does deleteBy methods in spring data work only with GET requests

I'm using Spring Data Rest and I have an Entity employee public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name =…
0
votes
1 answer

Spring Data: Page information missing fron response on using CollectionModel with RepositoryRestController

My repository method is: public Page findByStatusIn(List orderStatuses, Pageable pageable); Which is called from Controller (@RepositoryRestController) as : Pageable paging = PageRequest.of(page, pageSize,…
0
votes
0 answers

Caching GET method of @RepositoryRestResource

I have a @RespositoryRestResource class. Only the GET operation is being used which returns all the data. This is taking some time. So I want to cache this call. However I'm not sure how to achieve caching for RepositoryRestResource. Any help is…
0
votes
3 answers

id property inherited from AbstractPersistable is not recognized in a Spring Boot AOT compiled native image

I have migrated a Spring Boot application to Spring Boot 3 and compiled a native image. The application is exposing a simple entity using Spring Data REST (see code below). During application startup it terminates with complaining that no identifier…
0
votes
0 answers

Spring Data Rest Custom Controller ignored by OpenAPI

I'm usign Spring Data Rest and springdoc-openapi-ui. org.springframework.boot spring-boot-starter-data-rest org.springdoc
Ion Ionets
  • 105
  • 1
  • 8
0
votes
0 answers

Spring data rest: relationship return null and not save and not update

My problem is that when I define a relationship in spring data rest it does not return it as it is normally handled and I need it to return in the same standard way without having to consult the link I leave the configuration and the way I am doing.…
0
votes
0 answers

ManyToMany association with extra columns on Spring Data REST creates Error 'attempted to assign id from null one-to-one property'

ManyToMany: Recipes <--> Ingredients But with extra fields. @Entity @Getter @Setter @RequiredArgsConstructor public class Recipe { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private boolean vegetarian; …
José Cabo
  • 6,149
  • 3
  • 28
  • 39
0
votes
0 answers

How to deserialize json object referring related data using hal links with Jackson and GraalVm?

I'm currently struggling to implement a restfull api using -> Spring Boot 3.0.0, using spring data rest and spring hateoas -> Spring native support Basically, I would like to patch an entity, submitting a new value for a field (pointing to an…
0
votes
0 answers

Why Spring data rest repositories return relationship null

In spring boot starter data rest 2.7.4 the following problem arises when defining a relationship in this way. @ManyToOne @JoinColumn(name = "country_id", referencedColumnName = "id") private Country country; public…
0
votes
2 answers

Generate Link To Spring Data Rest Controller

I created a REST API with Spring Data Rest that forks fine. It must be possible to clone Projects via the API, so I added a custom @RestController to implement that via POST /projects/{id}/clone. @RestController @RequestMapping(value = "/projects",…
user3235738
  • 335
  • 4
  • 22
0
votes
0 answers

RepresentationModelProcessor nullpointer having mandatory field in controller spring 2.7.4

I have a class implementing RepresentationModelProcessor that's adding links to a resource: linkTo(methodOn(MyController.class).findMyElements(file.getId(), null, null)) .withRel("filterFiles")) The controller looks like…
user1497119
  • 443
  • 6
  • 19
1 2 3
99
100