serialization: 객체를 직렬화 함 (Json 또는 xml로 전환하는 것 )
@JsonProperty
@GetMapping("/filtering")
public MappingJacksonValue filtering() {
//MappingJacksonValue : REST API 메서드에 데이터뿐 아니라 필터링 방식도 정의
SomeBean someBean = new SomeBean("value1", "value2", "value3");
MappingJacksonValue mappingJacksonValue = new MappingJacksonValue(someBean);
SimpleBeanPropertyFilter filter = SimpleBeanPropertyFilter.filterOutAllExcept("field1","field3");
FilterProvider filters = new SimpleFilterProvider().addFilter("SomeBeanFilter", filter);
mappingJacksonValue.setFilters(filters);
return mappingJacksonValue;
}