Skip to content

ResourceProcessor bean which does not implement directly ResourceProcessor interface fails all serializers in spring data rest [DATAREST-379] #758

Open
@spring-projects-issues

Description

@spring-projects-issues

Adelino Rodrigues opened DATAREST-379 and commented

When a resource processor implementation implements the ResourceProcessor interface as below, all is well: it is invoked and custom links are added as expected.

public class MyDataResourceProcessor implements ResourceProcessor<Resource<MyData>>
{
// ...
}

On the other hand, when the implementation class inherits from a class, say MyAbstractResourceProcessor which itself implements the ResourceProcessor interface, the resource processor gets invoked but serialisation fails. Actually all other generated spring data rest serializers (or rest exporters) fail.

public class MyDataResourceProcessor extends MyAbstractResourceProcessor<MyData> {
// …
}

public abstract class MyAbstractResourceProcessor<T> implements ResourceProcessor<Resource<T>> {
// …
}

This is not a big problem but as it fails without any traces in the logs, I thought it is worth raising this issue


Affects: 2.1.2 (Dijkstra SR2)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions