spring-hateoas Questions
4
Solved
I have been looking at various examples of how to use Spring with REST. Our end target is a Spring HATEOAS/HAL setup
I have seen two distinct methods for rendering REST within Spring
Via @RestCo...
Firecracker asked 2/4, 2014 at 23:8
1
Solved
I have a controller with method, which returns PagedResource, which looks like this:
@RequestMapping(value = "search/within", method = RequestMethod.POST)
public @ResponseBody PagedResources withi...
Iconium asked 26/7, 2018 at 15:46
3
Solved
I'm trying to build a RESTful API with Spring Boot using spring-boot-starter-data-rest. There are some entities: accounts, transactions, categories and users - just the usual stuff.
When I retriev...
Omsk asked 1/8, 2015 at 6:7
3
Solved
I am trying to invoque very simple json webservices that return data of this form:
{
"_embedded": {
"users": [{
"identifier": "1",
"firstName": "John",
"lastName": "Doe",
"_links": {
"self"...
Benghazi asked 14/6, 2016 at 13:41
3
Solved
Problem
I have two entities defined: School and District. A district can have many schools and a school can belong to one district.
When executing a GET request against this endpoint http://localh...
Urinalysis asked 16/6, 2018 at 19:57
7
Solved
I want my response to include this:
"keyMaps":{
"href":"http://localhost/api/keyMaps{/keyMapId}",
"templated":true
}
That's easy enough to achieve:
add(new Link("http://localhost/api/keyMaps...
Ammerman asked 29/7, 2014 at 13:51
4
Solved
After adding a custom Jackson serializer based on the official documenation I've observed a slightly different json output format.
This example is based on spring-restbucks.
Extend org.springsource...
Oberg asked 24/3, 2014 at 15:5
1
Currently spring-data-rest is returning JSON in HAL format in a spring-boot project of mine. I am using an ember.js frontend and want to use jsonapi (http://jsonapi.org/) specification.
How might...
Maisel asked 4/3, 2015 at 0:35
4
I am working on spring boot for creating a REST application. And I have a DTO as shown below:
public class Subject {
private String uid;
private String number;
private String initials;
private Da...
Ark asked 13/3, 2015 at 8:8
1
I'm using Spring Data REST to expose my Entity's and their relationships. I have a OneToOne relationship between two Entity's and I'm trying to update/change the relationship with PUT and PATCH.
...
Lacrimatory asked 1/8, 2017 at 15:52
2
Solved
I want to create a Link to a resource within a Spring Data REST Repository. I know that we can use ControllerLinkBuilder.linkTo method to create links to MVC controllers. As far is I understand Spr...
Dump asked 20/8, 2015 at 9:10
1
Solved
I have a JPA entity that i am building hateoas links for:
@Entity
public class PolicyEvent extends ResourceSupport`
I want the hateoas links generated to be persisted in the PolicyEvent table.
...
Nessa asked 15/9, 2017 at 18:56
4
Solved
I'm trying to call Spring's ControllerLinkBuilder.methodOn() with a non-String type, which always fails. And I don't know which kind of Converter to use and where to register it.
Here's my Control...
Rodroda asked 7/3, 2014 at 2:14
2
I had was to expose the primary key which is annotated with @Id in entity.the ID field is only visible on the resource path, but not on the JSON body.
Hiatt asked 24/1, 2016 at 7:11
1
Solved
I am trying to use Spring Data REST with a given SQL schema, which uses the JPA @IdClass annotation for associative tables (intersection table, or many-to-many resolution table). These mapping enti...
Brendon asked 25/6, 2015 at 12:45
3
Solved
I'm using spring-mvc to create servlets like:
@RestController
public class MyServlet {
@GetMapping("/test")
public MyRsp test(MyReq req) {
//...
}
}
Now if the user accesses the root of my a...
Catinacation asked 13/6, 2017 at 10:18
1
By default when we have a repository with save method exposed we can do a PATCH request. Then Spring Data REST retrieves the original object from the database and apply changes to entity and then s...
Edington asked 31/5, 2017 at 13:13
1
I am trying the Spring HATEOAS with Spring Boot. And I wrote a unit test with rest assured:
given().standaloneSetup(new GreetingApi())
.accept("application/hal+json;charset=UTF-8")
.when()
.get...
Chromogenic asked 24/5, 2017 at 15:34
1
I have recently started using spring-data-rest for my application. I have the following JPA entities:
@Entity
public class Super {
@Id
private long id;
@JoinTable
@OneToMany(cascade = Cascade...
Reider asked 25/7, 2016 at 14:32
3
Solved
Is there any way to use a @Projection interface as the default representation for a resource in SDR? Either through the SDR repositories or through a custom controller?
It used to be possible in ...
Obala asked 22/10, 2015 at 18:48
2
Solved
I am using Spring hateoas to generate a HAL interface.
My code looks like this:
@RequestMapping(method = RequestMethod.GET)
public Resources<Resource<Type>> all() {
List<Resource&l...
Miscellaneous asked 22/10, 2015 at 20:6
3
Solved
My entity :
public class User {
private Integer id;
private String mail;
private boolean enabled;
// getters and setters
}
File test.json (response from REST webservice) :
{
"_embedded" ...
Spoliate asked 7/6, 2015 at 15:18
2
I have a method with a request parameter and I'm trying to link to this method from another resource. I want the link to be something like this:
"rel":{
"href":".../resources{?param}",
"template...
Disaccharide asked 23/3, 2015 at 19:33
2
Solved
I have the following REST controller.
@RepositoryRestController
@RequestMapping(value = "/booksCustom")
public class BooksController extends ResourceSupport {
@Autowired
public BooksService boo...
Disproof asked 2/12, 2016 at 23:52
3
I'm trying to do something I think should be really simple. I have a Question object, setup with spring-boot, spring-data-rest and spring-hateoas. All the basics work fine. I would like to add a cu...
Sexagenarian asked 23/10, 2014 at 21:56
© 2022 - 2024 — McMap. All rights reserved.