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
1 answer

Spring Boot with Spring HATEOAS Maven conflicts

It seems when I add the dependency for the spring-hateoas org.springframework.hateoas spring-hateoas 0.13.0.RELEASE The Class below is no longer available on the…
Laza
  • 91
  • 1
  • 8
0
votes
2 answers

How can inform Spring Data REST about my desire for link relations of an embedded document?

In MongoDB, I have a document collection named Customer which embeds customer-defined labels. My domain objects look like this (including Lombok annotations): @Document(collection = "Customer") @Getter @Setter public class Customer { @Id …
Jonathan W
  • 3,759
  • 19
  • 20
0
votes
3 answers

How can I fix this REST service to avoid ambiguous paths?

I'm using spring hateoas to create a rest service. I have database entities which I'm exposing through the REST API. To simplify, let's say I have an entity that has three fields as follows. id - a unique identifier service - a service this item…
conorgriffin
  • 4,282
  • 7
  • 51
  • 88
0
votes
1 answer

Spring Data Rest HATEOAS configure a sub-URI

I have Spring Data Rest with Spring Hateoas configured, specifically Spring-Data-Mongo. Works like a charm. Trouble is, entities are at the root of the URI. For example, for entity Person, and assume my servlet context is abc, it would be…
0
votes
1 answer

Error while Implementing HATEOAS in Spring

I am trying to implement REstful Web Services with Spring MVC. I first did it without using HATEOAS concept. i was returning the domain objects and it was working fine. Now i am trying to implement HATEOAS for the same methods in the Controller and…
Some Guy Really
  • 539
  • 2
  • 10
  • 19
0
votes
1 answer

Resulting JSON has different structure

I have a web application in which i use Spring MVC with Spring Hateoas with HypermediaType HAL. In my Controller i use the Resources Class to put in a list of Subjects. The problem is, that if i put in a list of one element, the structure of the…
David Schilling
  • 2,442
  • 3
  • 17
  • 24
0
votes
1 answer

Spring HATEOAS: How to advertise resource services?

I've got Spring HATEOAS working for accessing a specific resource, such as http://localhost:8080/user/1 But I want to also be able to advertise a service url: http://localhost:8080/user For instance, if you do a GET / , I want to return the…
Lurk21
  • 2,307
  • 12
  • 37
  • 55
-1
votes
1 answer

Rest controller test with @WebMvcTest, Could not instantiate JAXBContext for PagedResources

I have some tests that were failing with Error creating bean with name 'entityManagerFactory' this answer solved it for me https://stackoverflow.com/a/47504698/6945345 but broke my Controller test with Could not instantiate JAXBContext for class…
-1
votes
1 answer

How to integrate Cassandra and Solr for search engine using Spring Framework

Previously, we used Apache MySQL as data storage layer. And based on that we developed Spring-Hateoas APIs using Spring-Boot 1.2.7 - Spring-Data-JPA. Now as per new requirement, we wan to develop a search engine. Firstly, we were asked to move to…
-1
votes
1 answer

Sample code for implementation of HAL(Hypermedia Application Language) specification

Will somebody please post Sample code for implementation of HAL(Hypermedia Application Language) specification using Spring HATEOAS in maven which contains links and resources.
swati yedle
  • 91
  • 1
  • 5
-2
votes
2 answers

java.lang.ClassNotFoundException: org.springframework.core.annotation.MergedAnnotations

i'm facing issue while working with ControllerLinkBuilder when i provide method name it throw error when i don't it run and show me result. error seems jar issue but i tried with other versions too still same ' spring-boot-starter-hateoas' it…
Himanshi
  • 84
  • 1
  • 2
  • 13
-2
votes
2 answers

Spring boot 2 - REST controller test throws exception on org.springframework.hateoas.PagedResources

I have a test that's throwing an Could not instantiate JAXBContext for class [class org.springframework.hateoas.PagedResources] exception for my Spring boot 2 REST controller class. Am I missing some additional setup here or did I implement the test…
wdr
  • 37
  • 7
-7
votes
1 answer

Return link from Hateos

I have this old Spring Hateos code which I want to migrate to the latest version: Map links = new HashMap<>(); links.put(Link.REL_NEXT, response.getLink(Link.REL_NEXT)); links.put(Link.REL_PREVIOUS,…
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
1 2 3
51
52