How to set the default media type for spring-data-rest?
From RepositoryRestConfiguration I can see that setting spring.data.rest.default-media-type=application/json could change the default media type served by @RepositoryRestResource . @SuppressWarnings("deprecation") public class RepositoryRestConfiguration { private MediaType defaultMediaType = MediaTypes.HAL_JSON; } Question: as this class is in deprecation , what is the correct way to set/override the default type? You can do this via RepositoryRestConfiguration or simply with a property in your application.properties. See the documentation here . The RepositoryRestConfiguration class is NOT