Spring.data.rest.defaultMediaType = application / json not working

I am trying to set the spring response to write data as json, not HATEOS.

I tried to place this rule in application.properties, but did not work. The manual only displays

defaultMediaType - change the default media type to use if none is specified

Any other configuration is loaded from the application.properties application, but this is not done.

spring.data.rest.defaultMediaType=application/json
+4
source share
1 answer

This was answered with reference to gyoder: It is not necessary to disable the HATEOAS format in Spring Data Rest

: spring -data-rest . - , ( spring -data).

SO:

, , REST. , (). , SpringData REST, . , , , :). -

0

Source: https://habr.com/ru/post/1676958/


All Articles