Class JsonProjectingMethodInterceptorFactory

java.lang.Object
org.springframework.data.web.JsonProjectingMethodInterceptorFactory
All Implemented Interfaces:
MethodInterceptorFactory

public class JsonProjectingMethodInterceptorFactory extends Object implements MethodInterceptorFactory
MethodInterceptorFactory to create a MethodInterceptor that will
Since:
1.13
Author:
Oliver Gierke, Mark Paluch, Mikhael Sokolov
  • Constructor Details

    • JsonProjectingMethodInterceptorFactory

      public JsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider)
      Creates a new JsonProjectingMethodInterceptorFactory using the default JsonProvider and the given MappingProvider.
      Parameters:
      mappingProvider - must not be null.
      See Also:
      • Configuration.defaultConfiguration()
      • Configuration.jsonProvider()
    • JsonProjectingMethodInterceptorFactory

      public JsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.json.JsonProvider jsonProvider, com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider)
      Creates a new JsonProjectingMethodInterceptorFactory using the given JsonProvider and MappingProvider.
      Parameters:
      jsonProvider - must not be null.
      mappingProvider - must not be null.
      Since:
      2.5.3
  • Method Details

    • createMethodInterceptor

      public org.aopalliance.intercept.MethodInterceptor createMethodInterceptor(Object source, Class<?> targetType)
      Description copied from interface: MethodInterceptorFactory
      Returns the MethodInterceptor to be used for the given source object and target type.
      Specified by:
      createMethodInterceptor in interface MethodInterceptorFactory
      Parameters:
      source - will never be null.
      targetType - will never be null.
      Returns:
    • supports

      public boolean supports(Object source, Class<?> targetType)
      Description copied from interface: MethodInterceptorFactory
      Returns whether the current factory is supposed to be used to create a MethodInterceptor for proxy of the given target type.
      Specified by:
      supports in interface MethodInterceptorFactory
      Parameters:
      source - will never be null.
      targetType - will never be null.
      Returns: