content: package com.bookstore.config;
  
  import com.fasterxml.jackson.databind.ObjectMapper;
  import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
  import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
  
  import org.springframework.context.annotation.Configuration;
  import org.springframework.http.converter.HttpMessageConverter;
  import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
  import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
  
  import java.util.List;
  
  @Configuration
  public class WebConfig extends WebMvcConfigurationSupport {
      @Override
      protected void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
          for (HttpMessageConverter<?> converter : converters) {
              if (converter instanceof MappingJackson2HttpMessageConverter) {
                  ObjectMapper mapper = ((MappingJackson2HttpMessageConverter) converter).getObjectMapper();
                  mapper.setFilterProvider(new SimpleFilterProvider().addFilter("AuthorId", SimpleBeanPropertyFilter.serializeAll()));
              }
          }
      }
  }