Exemplo n.º 1
0
 @Override
 public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
   configurer
       .favorPathExtension(true)
       .ignoreAcceptHeader(false)
       .useJaf(false)
       .defaultContentType(MediaType.TEXT_HTML)
       .mediaType("html", MediaType.TEXT_HTML)
       .mediaType("json", MediaType.APPLICATION_JSON);
 }
Exemplo n.º 2
0
 @Override
 public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
   configurer.ignoreUnknownPathExtensions(false).defaultContentType(MediaType.TEXT_HTML);
 }