springmvc json 열의null 값을 빈 값으로 바꾸기

1238 단어
springmvc 프로필

	
		
			text/html;charset=UTF-8
			application/json;charset=UTF-8
		
	
      
          
              
                  
                      
                          
                      
                  
              
          
        

NullValueSerializer
public class NullValueSerializer extends JsonSerializer {  
    @Override  
    public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider)  
            throws IOException, JsonProcessingException {  
        jgen.writeString("");
    }  
}

  
  
전재 대상:https://www.cnblogs.com/BINGJJFLY/p/10812119.html

좋은 웹페이지 즐겨찾기