30
30
import org .apache .ibatis .cache .CacheKey ;
31
31
import org .apache .ibatis .executor .Executor ;
32
32
import org .apache .ibatis .executor .ExecutorException ;
33
- import org .apache .ibatis .executor .loader .ProxyFactory ;
34
33
import org .apache .ibatis .executor .loader .ResultLoader ;
35
34
import org .apache .ibatis .executor .loader .ResultLoaderMap ;
36
- import org .apache .ibatis .executor .loader .cglib .CglibProxyFactory ;
37
35
import org .apache .ibatis .executor .parameter .ParameterHandler ;
38
36
import org .apache .ibatis .executor .result .DefaultResultContext ;
39
37
import org .apache .ibatis .executor .result .DefaultResultHandler ;
@@ -68,7 +66,6 @@ public class DefaultResultSetHandler implements ResultSetHandler {
68
66
private final BoundSql boundSql ;
69
67
private final TypeHandlerRegistry typeHandlerRegistry ;
70
68
private final ObjectFactory objectFactory ;
71
- private final ProxyFactory proxyFactory ;
72
69
73
70
// nested resultmaps
74
71
private final Map <CacheKey , Object > nestedResultObjects = new HashMap <CacheKey , Object >();
@@ -95,7 +92,6 @@ public DefaultResultSetHandler(Executor executor, MappedStatement mappedStatemen
95
92
this .typeHandlerRegistry = configuration .getTypeHandlerRegistry ();
96
93
this .objectFactory = configuration .getObjectFactory ();
97
94
this .resultHandler = resultHandler ;
98
- this .proxyFactory = configuration .getProxyFactory () == null ? new CglibProxyFactory () : configuration .getProxyFactory ();
99
95
}
100
96
101
97
//
@@ -509,7 +505,7 @@ private Object createResultObject(ResultSetWrapper rsw, ResultMap resultMap, Res
509
505
final List <ResultMapping > propertyMappings = resultMap .getPropertyResultMappings ();
510
506
for (ResultMapping propertyMapping : propertyMappings ) {
511
507
if (propertyMapping .getNestedQueryId () != null && propertyMapping .isLazy ()) { // issue gcode #109 && issue #149
512
- return proxyFactory .createProxy (resultObject , lazyLoader , configuration , objectFactory , constructorArgTypes , constructorArgs );
508
+ return configuration . getProxyFactory () .createProxy (resultObject , lazyLoader , configuration , objectFactory , constructorArgTypes , constructorArgs );
513
509
}
514
510
}
515
511
}
0 commit comments