spring-data-rest Questions

5

I have a model: public class MyModel { @Id private Long id; private Long externalId; // Getters, setters } I'd like to use externalId as my resource identifier: @Configuration static class R...
Peer asked 22/7, 2017 at 9:7

7

Solved

In Spring Boot 1.2.3.RELEASE with fasterxml what is the correct way of serializing and de-serializing a LocalDate field to ISO date formatted string? I've tried: spring.jackson.serialization.write...
Backfield asked 16/6, 2015 at 14:58

3

I'm creating a Spring REST app using Spring Boot 2, Spring Data REST, Spring HATEOAS. I created this controller: @Api(tags = "City Entity") @RepositoryRestController @RequestMapping(path = "/api/...
Infrastructure asked 8/2, 2019 at 10:17

5

I'm using spring-data-rest with JpaRepository to create the Rest-Endpoints. By default, paging is enabled for all JpaRepository, what is a good thing. But I have a legacy application that we port t...
Langur asked 13/7, 2015 at 9:36

6

My task is to make an advanced search with Spring Data REST. How can I implement it? I managed to make a method to do a simple search, like this one: public interface ExampleRepository extends Cr...
Juanajuanita asked 25/3, 2016 at 15:27

2

Solved

I'm having a problem to expose RevisionRepository (Spring Data Envers) endpoints for my repository which extends RevisionRepository as below : @RepositoryRestResource(path = "disciplines", itemRe...
Figurate asked 10/12, 2015 at 8:5

7

Solved

I'm using spring data (mongoDb) and I've got my repository: public interface StoriesRepository extends PagingAndSortingRepository<Story, String> {} Then i have a controller: @RequestMappi...
Convery asked 5/12, 2015 at 0:7

5

Solved

I have been trying to add spring validators to a spring-data-rest project. I followed along and setup the "getting started" application via this link: http://spring.io/guides/gs/accessing-data-res...
Dependent asked 20/6, 2014 at 0:47

7

I am new to Spring Data REST project and I am trying to create my first RESTful service. The task is simple, but I am stuck. I want to perform CRUD operations on a user data stored in an embedded ...
Mangle asked 24/8, 2017 at 14:1

14

Solved

When I hit the database with PagingAndSortingRepository.findAll(Pageable) I get Page<ObjectEntity>. However, I want to expose DTO's to the client and not entities. I can create DTO just by in...
Mutilate asked 19/8, 2016 at 10:30

2

I want to customize the response of a hypermedia Rest JPA entity and want to remove all the _links attributes and self link attributes. My client application is not that big and it knows what exac...
Mooch asked 11/9, 2016 at 5:3

3

Solved

In my database I have 2 entities in a unidirectional relationship, User and Message: CREATE TABLE public."user" ( uuid uuid NOT NULL DEFAULT uuid_generate_v4(), "name" varchar...
Scherzando asked 5/4, 2021 at 21:13

7

Solved

I've got an entity @Entity @Table(name = "books") public class Book { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; @Column(name = "id", unique = ...
Mckinnon asked 18/5, 2017 at 11:36

3

I'm writing unit tests for Spring HATEOAS backend using MockMvc and JsonPath. To test the links contained in a response I'm doing something like: @Test public void testListEmpty() throws Exception...
Taxiway asked 29/8, 2014 at 14:46

3

I'm trying to get the validation in spring-data-rest to work. From the documentation you only need to make a validator available, and I've got that to work, but when a validation constraint is succ...
Cindiecindra asked 26/2, 2014 at 1:17

2

Relates to: Spring Data Rest version 2.0.2 I'm trying to POST an entity (Address) with a @ManyToOne (instead of @OneToOne as in example) relationship to Person as explained in: Embedded Entity ref...
Disentail asked 20/5, 2014 at 18:23

4

Solved

Working with Spring Data REST, if you have a OneToMany or ManyToOne relationship, the PUT operation returns 200 on the "non-owning" entity but does not actually persist the joined resource. Exampl...

12

Solved

Is it possible to integrate Spring managed Hibernate interceptors (http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch14.html) in Spring Boot? I'm using Spring Data JPA and Spring Data RE...

1

Solved

I'm trying to create a Spring Data MongoDB repository method that could perform case insensitive search for fields from a given list, that is functionality similar to SQL 'IN' operator. In my repo...

4

Solved

I want to expose data from a database as Restful APIs in a Spring(SpringBoot) application. Spring Data Rest appears to be an exact fit for purpose for this activity. This database is read-only for...
Costa asked 28/2, 2017 at 10:43

15

Solved

I'd like to expose all IDs using a Spring Rest interface. I know that per default an ID like this will not be exposed via the rest interface: @Id @GeneratedValue(strategy=GenerationType.IDENTIT...
Drury asked 18/6, 2015 at 10:26

3

Solved

Using Spring Data REST with JPA in version 2.1.0. How can I configure the pagination in order to have the page argument starting at index 1 instead of 0 ? I have tried setting a custom HateoasPag...
Filippa asked 7/5, 2014 at 14:55

3

Solved

I am working with a Spring Data MongoDB project which exports its endpoints via Spring Data REST. It uses the springdoc-openapi-data-rest module of the springdoc-openapi library to generate an Open...
Garrotte asked 13/10, 2022 at 2:12

4

Solved

I have an entity named EmployeeDepartment as below @IdClass(EmployeeDepartmentPK.class) //EmployeeDepartmentPK is a serializeable object @Entity EmployeeDepartment{ @Id private String employeeID;...
Grenoble asked 4/8, 2015 at 18:19

3

Solved

I use spring data rest for crud. But when the entity has composite primary keys, I dont know how to to get an entity by giving the primary key. River class: @Entity public class River { private ...
Polygamous asked 3/5, 2017 at 14:42

© 2022 - 2025 — McMap. All rights reserved.