示例#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);
 }
示例#2
0
 @Override
 public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
   configurer.ignoreUnknownPathExtensions(false).defaultContentType(MediaType.TEXT_HTML);
 }