Questions tagged [spring-hateoas]

Spring HATEOAS provides some APIs to ease creating REST representations that follow the HATEOAS principle when working with Spring and especially Spring MVC. The core problem it tries to address is link creation and representation assembly.

HATEOAS (Hypertext As The Engine of Application State)

Resources

Clarification by Roy Fielding that HATEOAS is required for REST.

Building REST services with Spring explains what HATEOAS is, why it is required for REST and how to implement it using Spring MVC and Spring HATEOAS.

779 questions
0
votes
2 answers

Spring Boot: HATEOAS and custom JacksonObjectMapper

After I added dependency for HATEOAS to Maven, Spring Boot does not start: Added dependency: org.springframework.boot spring-boot-starter-hateoas Full pom.xml:
EvideShow
  • 39
  • 4
0
votes
1 answer

Using HAL with Hateoas on springboot 2.2.4

I have a model response that extends RepresentationModel : @Getter @Setter public class AddressRestResponseModel extends RepresentationModel { private String addressKeyId; private String city; private String…
davidvera
  • 1,292
  • 2
  • 24
  • 55
0
votes
0 answers

Spring Data Rest return subobjects without projection

I'm new to Spring and wondering how to go about achieving something. I want to include a Collection of mapped entities with doing a GET on an owning entity. For example, say I have an entity that looks like: @Entity @Table(name="USERS") public class…
sb9
  • 266
  • 7
  • 22
0
votes
1 answer

Spring Boot v2.2.2.RELEASE throw error when Pagination Size more than anticipated

I'm using Spring Boot (v2.2.2.RELEASE) + Spring Data Mongo + Spring REST + Spring HATEOAS example. In this example, if consumer sends Pagination max-page-size=200 more than 200 then I would need to show the error message saying maximum allowable…
PAA
  • 1
  • 46
  • 174
  • 282
0
votes
1 answer

How to set Max Pagination Size in Spring Boot?

I'm developing Spring Boot + Spring Data Mongo + Spring HATEOAS example. I'm using Spring Boot V2.2.2.RELEASE. I'm globally trying to set the Pagination PageSize limit to 200. For that I went through spring data jpa limit pagesize, how to set to…
PAA
  • 1
  • 46
  • 174
  • 282
0
votes
1 answer

No qualifying bean of type 'org.springframework.data.rest.core.util.Java8PluginRegistry' available

As part of migrating a spring application to springboot (2.1.7), I'm facing an issue for a custom RepositoryEntityLinks class. The below class was giving a compilation issue for the constructor argument PluginRegistry, hence I changed it to…
Praveesh P
  • 1,399
  • 2
  • 25
  • 42
0
votes
1 answer

Providing information ragarding the content of a link target with HAL

We intend to use Spring-HATEOAS to enrich our interface with hypermedia informations via HAL/JSON. What we are wondering is, how to provide sufficient meta information of what we are going to find in a resource after following a link. I identified…
0
votes
1 answer

Spring REST Docs - Avoid document the links

I have this method in a SpringBoot 2 application: @Test public void shouldEchoTheParameter() throws Exception { mockMvc.perform(get("/echo").param("echoMessage", "Test")) .andExpect(status().isOk()) .andExpect(jsonPath("$.message",…
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
0
votes
1 answer

Maven dependency Issue for Spring Hateoas

org.springframework.hateoas spring-hateoas 0.23.0.RELEASE I have added this Spring hateoas dependency in my pom.xml still my project is taking…
Priyanka Taneja
  • 515
  • 1
  • 5
  • 21
0
votes
2 answers

Using Spring-Data-Rest, how to update FK on both sides of OneToOne relationship from one REST call?

I have a Spring-Boot app with spring-boot-starter-data-rest spring-boot-starter-data-jpa h2 I have entities with one-to-one relationship like this: @Entity public class Address { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) …
Zack
  • 3,819
  • 3
  • 27
  • 48
0
votes
1 answer

Entity model inheritance Spring Hateoas 1.0

With Spring Hateoas 0.25, we had code like this: public class StatisticsResource extends Resource { : } public class StatisticsResourceAssembler extends ResourceAssemblerSupport { …
Bert
  • 861
  • 9
  • 22
0
votes
0 answers

Why am I getting empty links in Json response as part of the embedded resources?

I am trying to populate JSON response which includes embedded resources using Spring Hateoas framework.But I am getting empty "links" as part of my Json response. Unable to figure which part/module of the function is populating empty JSON…
user660760
  • 19
  • 3
0
votes
2 answers

Integration Test Started failing post Spring boot 2.2.0 upgrade with Swagger latest version 2.9.2 & HATEOS

Integration Test Started failing post Spring boot 2.2.0 upgrade with Swagger latest version 2.9.2 & HATEOS java.lang.IllegalStateException: Failed to load ApplicationContext Caused by:…
Pushkar
  • 727
  • 1
  • 7
  • 21
0
votes
1 answer

why user.get() method gives me error? and idk how to google

USER.GET() gives error and idk both why happens and how to google. Is there anyone who knows how to solve this error ? thanks for your concern!! @GetMapping("/users/{id}") public EntityModel retrieveUser(@PathVariable int id) { User…
0
votes
1 answer

Can Avro-generated classes be used directly with Spring HATEOAS EntityModel?

I am trying to use domain model classes generated from schema using avro-maven-plugin 1.8.2 with spring-hateoas 1.0.0.RELEASE (via Spring Boot 2.2.0.RC1). The Spring MVC 5.2.0.RELEASE framework throws…