本文整理匯總了Java中org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer.favorPathExtension方法的典型用法代碼示例。如果您正苦於以下問題:Java ContentNegotiationConfigurer.favorPathExtension方法的具體用法?Java ContentNegotiationConfigurer.favorPathExtension怎麽用?Java ContentNegotiationConfigurer.favorPathExtension使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer
的用法示例。
在下文中一共展示了ContentNegotiationConfigurer.favorPathExtension方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(
ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
configurer.ignoreAcceptHeader(false);
configurer.defaultContentType(MediaType.TEXT_PLAIN);
configurer.mediaType("html", MediaType.TEXT_HTML);
configurer.mediaType("xml", MediaType.APPLICATION_XML);
}
示例2: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
protected void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.defaultContentType(MediaType.APPLICATION_JSON);
configurer.favorPathExtension(true);
configurer.ignoreAcceptHeader(false);
configurer.mediaType("json", MediaType.APPLICATION_JSON);
configurer.mediaType("jsonp", new MediaType("application", "x-javascript"));
super.configureContentNegotiation(configurer);
}
示例3: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.mediaType("json", MediaType.APPLICATION_JSON_UTF8);
configurer.mediaType("xml", MediaType.APPLICATION_XML);
configurer.defaultContentType(API_V3_MEDIA_TYPE);
configurer.favorParameter(true);
configurer.favorPathExtension(false);
}
示例4: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(
ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
示例5: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) {
configurer.defaultContentType(MediaType.APPLICATION_FORM_URLENCODED);
configurer.favorPathExtension(false);
configurer.mediaType("xml", MediaType.TEXT_XML);
}
示例6: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
configurer.ignoreAcceptHeader(true).defaultContentType(MediaType.APPLICATION_JSON);
}
示例7: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
/**
* Configure content negotiation options.
*/
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
示例8: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
protected void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
示例9: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
示例10: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
示例11: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
示例12: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(true);
configurer.ignoreAcceptHeader(true);
configurer.defaultContentType(MediaType.APPLICATION_JSON);
}
示例13: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
protected void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
super.configureContentNegotiation(configurer);
configurer.favorPathExtension(false);
}
示例14: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorParameter(false);
configurer.favorPathExtension(false);
}
示例15: configureContentNegotiation
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; //導入方法依賴的package包/類
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorParameter(false);
configurer.favorPathExtension(false);
}