{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/279","labels_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/279/comments","events_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/279/events","html_url":"https://github.com/spring-projects/spring-hateoas/issues/279","id":54574459,"number":279,"title":"Wrong marshalling from ControllerAdvice","user":{"login":"fdw","id":5821180,"avatar_url":"https://avatars.githubusercontent.com/u/5821180?v=3","gravatar_id":"","url":"https://api.github.com/users/fdw","html_url":"https://github.com/fdw","followers_url":"https://api.github.com/users/fdw/followers","following_url":"https://api.github.com/users/fdw/following{/other_user}","gists_url":"https://api.github.com/users/fdw/gists{/gist_id}","starred_url":"https://api.github.com/users/fdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdw/subscriptions","organizations_url":"https://api.github.com/users/fdw/orgs","repos_url":"https://api.github.com/users/fdw/repos","events_url":"https://api.github.com/users/fdw/events{/privacy}","received_events_url":"https://api.github.com/users/fdw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-hateoas/labels/waiting-for-feedback","name":"waiting-for-feedback","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"olivergierke","id":128577,"avatar_url":"https://avatars.githubusercontent.com/u/128577?v=3","gravatar_id":"","url":"https://api.github.com/users/olivergierke","html_url":"https://github.com/olivergierke","followers_url":"https://api.github.com/users/olivergierke/followers","following_url":"https://api.github.com/users/olivergierke/following{/other_user}","gists_url":"https://api.github.com/users/olivergierke/gists{/gist_id}","starred_url":"https://api.github.com/users/olivergierke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivergierke/subscriptions","organizations_url":"https://api.github.com/users/olivergierke/orgs","repos_url":"https://api.github.com/users/olivergierke/repos","events_url":"https://api.github.com/users/olivergierke/events{/privacy}","received_events_url":"https://api.github.com/users/olivergierke/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-01-16T13:19:38Z","updated_at":"2015-02-27T12:20:59Z","closed_at":null,"body":"I'm using an exception handler annotated with @ControllerAdvice in a Spring-MVC application. For some errors, I want to return a useful response containing HAL-links.\r\n\r\nUnfortunately, those links are not rendered correctly in JSON as \"_links\", but rather as \"links\". It seems that when using @ControllerAdvice, the SerializerMixins are not configured for Jackson: Through debugging, I noticed that DefaultSerializerProvider._config.mixInAnnotations is empty here, but contains, among others, \"org.springframework.hateoas.hal.ResourceSupportMixin\" when marshalling from an ordinary @RestController. The content-type is correctly set to \"application/hal+json\".\r\n\r\nDid I miss something? Is there a way to render correct links?"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/comments/76386622","html_url":"https://github.com/spring-projects/spring-hateoas/issues/279#issuecomment-76386622","issue_url":"https://api.github.com/repos/spring-projects/spring-hateoas/issues/279","id":76386622,"user":{"login":"fdw","id":5821180,"avatar_url":"https://avatars.githubusercontent.com/u/5821180?v=3","gravatar_id":"","url":"https://api.github.com/users/fdw","html_url":"https://github.com/fdw","followers_url":"https://api.github.com/users/fdw/followers","following_url":"https://api.github.com/users/fdw/following{/other_user}","gists_url":"https://api.github.com/users/fdw/gists{/gist_id}","starred_url":"https://api.github.com/users/fdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdw/subscriptions","organizations_url":"https://api.github.com/users/fdw/orgs","repos_url":"https://api.github.com/users/fdw/repos","events_url":"https://api.github.com/users/fdw/events{/privacy}","received_events_url":"https://api.github.com/users/fdw/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T12:20:59Z","updated_at":"2015-02-27T12:20:59Z","body":"I return a custom object (let's call it ErrorResource) that inherits from ResourceSupport, just like I do in other controllers. If I return such an ErrorResource from a regular controller, the links are rendered correctly, so this seems to work."}}