當前位置: 首頁>>代碼示例>>Java>>正文


Java MappingJackson2JsonView.setPrettyPrint方法代碼示例

本文整理匯總了Java中org.springframework.web.servlet.view.json.MappingJackson2JsonView.setPrettyPrint方法的典型用法代碼示例。如果您正苦於以下問題:Java MappingJackson2JsonView.setPrettyPrint方法的具體用法?Java MappingJackson2JsonView.setPrettyPrint怎麽用?Java MappingJackson2JsonView.setPrettyPrint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.web.servlet.view.json.MappingJackson2JsonView的用法示例。


在下文中一共展示了MappingJackson2JsonView.setPrettyPrint方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createDelegatedView

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
private static MappingJackson2JsonView createDelegatedView() {
    final MappingJackson2JsonView view = new MappingJackson2JsonView();
    view.setPrettyPrint(true);
    view.setDisableCaching(true);
    view.getObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL);
    return view;
}
 
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:8,代碼來源:Cas30JsonResponseView.java

示例2: createDelegatedView

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
private static MappingJackson2JsonView createDelegatedView() {
    final MappingJackson2JsonView view = new MappingJackson2JsonView();
    view.setPrettyPrint(true);
    view.setDisableCaching(true);
    view.getObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL).findAndRegisterModules();
    return view;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:8,代碼來源:Cas30JsonResponseView.java

示例3: resolveViewName

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
@Override
public View resolveViewName(String viewName, Locale locale) throws Exception {
  MappingJackson2JsonView view = new MappingJackson2JsonView();
  view.setExtractValueFromSingleKeyModel(true);
  view.setPrettyPrint(true);
  return view;
}
 
開發者ID:puncha,項目名稱:petclinic,代碼行數:8,代碼來源:JsonViewResolver.java

示例4: resolveViewName

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
/**
 * Get the view to use.
 *
 * @return Always returns an instance of {@link MappingJackson2JsonView}.
 */
@Override
public View resolveViewName(String viewName, Locale locale)
        throws Exception {
    MappingJackson2JsonView view = new MappingJackson2JsonView();
    view.setPrettyPrint(true);
    return view;
}
 
開發者ID:whyDK37,項目名稱:pinenut,代碼行數:13,代碼來源:JsonViewResolver.java

示例5: resolveViewName

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
/**
 * Get the view to use.
 *
 * @return Always returns an instance of {@link MappingJacksonJsonView}.
 */
@Override
public View resolveViewName(String viewName, Locale locale) throws Exception {
    MappingJackson2JsonView view = new MappingJackson2JsonView();
    //view.setObjectMapper(objectMapper);
    view.setPrettyPrint(true);      // Lay the JSON out to be nicely readable
    return view;
}
 
開發者ID:Miamoto-Musashi,項目名稱:spring-demo,代碼行數:13,代碼來源:JsonViewResolver.java

示例6: resolveViewName

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
@Override
  public View resolveViewName(String viewName, Locale locale) throws Exception {
MappingJackson2JsonView view = new MappingJackson2JsonView();
view.setPrettyPrint(true);
return view;
  }
 
開發者ID:nailtonvieira,項目名稱:pswot-cloud-java-spring-webapp,代碼行數:7,代碼來源:JsonViewResolver.java

示例7: jsonTemplate

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
@Bean
public View jsonTemplate() {
    MappingJackson2JsonView view = new MappingJackson2JsonView();
    view.setPrettyPrint(true);
    return view;
}
 
開發者ID:StefanSchubert,項目名稱:sabi,代碼行數:7,代碼來源:RESTConfiguration.java

示例8: resolveViewName

import org.springframework.web.servlet.view.json.MappingJackson2JsonView; //導入方法依賴的package包/類
public View resolveViewName(String viewName, Locale locale) throws Exception {
    MappingJackson2JsonView view = new MappingJackson2JsonView();
    view.setPrettyPrint(true);
    return view;
}
 
開發者ID:gill3s,項目名稱:opentipbot,代碼行數:6,代碼來源:JsonViewResolver.java


注:本文中的org.springframework.web.servlet.view.json.MappingJackson2JsonView.setPrettyPrint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。