Package org.springframework.data.web
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 Summary
ConstructorsConstructorDescriptionJsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.json.JsonProvider jsonProvider, com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider) Creates a newJsonProjectingMethodInterceptorFactoryusing the givenJsonProviderandMappingProvider.JsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider) Creates a newJsonProjectingMethodInterceptorFactoryusing the defaultJsonProviderand the givenMappingProvider. -
Method Summary
Modifier and TypeMethodDescriptioncreateMethodInterceptor(Object source, Class<?> targetType) Returns theMethodInterceptorto be used for the given source object and target type.booleanReturns whether the current factory is supposed to be used to create aMethodInterceptorfor proxy of the given target type.
-
Constructor Details
-
JsonProjectingMethodInterceptorFactory
public JsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider) Creates a newJsonProjectingMethodInterceptorFactoryusing the defaultJsonProviderand the givenMappingProvider.- 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 newJsonProjectingMethodInterceptorFactoryusing the givenJsonProviderandMappingProvider.- Parameters:
jsonProvider- must not be null.mappingProvider- must not be null.- Since:
- 2.5.3
-
-
Method Details
-
createMethodInterceptor
Description copied from interface:MethodInterceptorFactoryReturns theMethodInterceptorto be used for the given source object and target type.- Specified by:
createMethodInterceptorin interfaceMethodInterceptorFactory- Parameters:
source- will never be null.targetType- will never be null.- Returns:
-
supports
Description copied from interface:MethodInterceptorFactoryReturns whether the current factory is supposed to be used to create aMethodInterceptorfor proxy of the given target type.- Specified by:
supportsin interfaceMethodInterceptorFactory- Parameters:
source- will never be null.targetType- will never be null.- Returns:
-