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
ConstructorDescriptionJsonProjectingMethodInterceptorFactory
(com.jayway.jsonpath.spi.json.JsonProvider jsonProvider, com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider) Creates a newJsonProjectingMethodInterceptorFactory
using the givenJsonProvider
andMappingProvider
.JsonProjectingMethodInterceptorFactory
(com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider) Creates a newJsonProjectingMethodInterceptorFactory
using the defaultJsonProvider
and the givenMappingProvider
. -
Method Summary
Modifier and TypeMethodDescriptionorg.aopalliance.intercept.MethodInterceptor
createMethodInterceptor
(Object source, Class<?> targetType) Returns theMethodInterceptor
to be used for the given source object and target type.boolean
Returns whether the current factory is supposed to be used to create aMethodInterceptor
for proxy of the given target type.
-
Constructor Details
-
JsonProjectingMethodInterceptorFactory
public JsonProjectingMethodInterceptorFactory(com.jayway.jsonpath.spi.mapper.MappingProvider mappingProvider) Creates a newJsonProjectingMethodInterceptorFactory
using the defaultJsonProvider
and 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 newJsonProjectingMethodInterceptorFactory
using the givenJsonProvider
andMappingProvider
.- 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 theMethodInterceptor
to be used for the given source object and target type.- Specified by:
createMethodInterceptor
in interfaceMethodInterceptorFactory
- Parameters:
source
- will never be null.targetType
- will never be null.- Returns:
-
supports
Description copied from interface:MethodInterceptorFactory
Returns whether the current factory is supposed to be used to create aMethodInterceptor
for proxy of the given target type.- Specified by:
supports
in interfaceMethodInterceptorFactory
- Parameters:
source
- will never be null.targetType
- will never be null.- Returns:
-