Skip to content

@EnableHypermediaSupport is not compatible with Spring Boot Jackson settings [SPR-13738] #18311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Nov 30, 2015 · 2 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@spring-projects-issues
Copy link
Collaborator

Endre Czirbesz opened SPR-13738 and commented

In my project, I'm using Spring Boot 1.3.0 and Hateoas 0.19.

I would like to serialize dates as strings, so in my configuration file I have spring.jackson.serialization.write-dates-as-timestamps=false.

If I use @EnableHypermediaSupport, the dates get serialized to longs.

It seems that enabling hypermedia support always creates a _halObjectMapper bean (), which does not care about these settings.

I even have

@Bean
@Primary
public ObjectMapper jacksonObjectMapper(final Jackson2ObjectMapperBuilder builder) {
    return builder.createXmlMapper(false).build();
}

to enforce these setting, which works fine everywhere else, except for the returned resources, which are always got serialized using this _halObjectMapper.


Affects: 4.2.3

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I'm afraid this is the wrong issue tracker, since it's just for the core Spring Framework project.

Spring HATEOAS tracks its issues on GitHub, so please report this at https://github.com/spring-projects/spring-hateoas/issues - sorry for the inconvenience...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Endre Czirbesz commented

Thanks for the pointer, actually this issue is already reported there. Just for future reference: spring-projects/spring-hateoas#333

@spring-projects-issues spring-projects-issues added type: bug A general bug status: invalid An issue that we don't feel is valid and removed type: bug A general bug labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

1 participant