/*    */ package com.picc.grab.config.web;
/*    */ 
/*    */ import com.alibaba.fastjson.serializer.SerializerFeature;
/*    */ import com.alibaba.fastjson.support.config.FastJsonConfig;
/*    */ import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
/*    */ import java.nio.charset.Charset;
/*    */ import java.util.List;
/*    */ import org.springframework.context.annotation.Bean;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.http.converter.HttpMessageConverter;
/*    */ import org.springframework.http.converter.StringHttpMessageConverter;
/*    */ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Configuration
/*    */ public class WebConfig
/*    */   extends WebMvcConfigurerAdapter
/*    */ {
/*    */   @Bean
/*    */   public HttpMessageConverter<String> responseBodyConverter() {
/* 26 */     StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
/* 27 */     return (HttpMessageConverter<String>)converter;
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
/* 38 */     FastJsonHttpMessageConverter fastJsonConverter = new FastJsonHttpMessageConverter();
/* 39 */     FastJsonConfig fjc = new FastJsonConfig();
/*    */     
/* 41 */     fjc.setSerializerFeatures(new SerializerFeature[] { SerializerFeature.BrowserCompatible });
/* 42 */     fastJsonConverter.setFastJsonConfig(fjc);
/* 43 */     converters.add(fastJsonConverter);
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\grab\config\web\WebConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */