Skip to content

Commit 586dc88

Browse files
authored
Merge pull request #2499 from harawata/deprecate-cglib
Deprecate CGLIB proxy factory
2 parents 0f6010c + de54f20 commit 586dc88

File tree

7 files changed

+10
-5
lines changed

7 files changed

+10
-5
lines changed

src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141

4242
/**
4343
* @author Clinton Begin
44+
* @deprecated Since 3.5.10, use Javassist instead.
4445
*/
46+
@Deprecated
4547
public class CglibProxyFactory implements ProxyFactory {
4648

4749
private static final String FINALIZE_METHOD = "finalize";
@@ -65,6 +67,7 @@ public Object createDeserializationProxy(Object target, Map<String, ResultLoader
6567
}
6668

6769
static Object crateProxy(Class<?> type, Callback callback, List<Class<?>> constructorArgTypes, List<Object> constructorArgs) {
70+
LogHolder.log.warn("CglibProxyFactory is deprecated. Use another proxy factory implementation.");
6871
Enhancer enhancer = new Enhancer();
6972
enhancer.setCallback(callback);
7073
enhancer.setSuperclass(type);

src/main/java/org/apache/ibatis/executor/loader/cglib/CglibSerialStateHolder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424

2525
/**
2626
* @author Eduardo Macarron
27+
* @deprecated Since 3.5.10, use Javassist instead.
2728
*/
29+
@Deprecated
2830
class CglibSerialStateHolder extends AbstractSerialStateHolder {
2931

3032
private static final long serialVersionUID = 8940388717901644661L;

src/site/es/xdoc/configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
496496
Permite especificar qué herramienta de generación de proxys se usará para crear los objetos con capacidad de carga lazy.
497497
</td>
498498
<td>
499-
CGLIB | JAVASSIST
499+
CGLIB (deprecated since 3.5.10) | JAVASSIST
500500
</td>
501501
<td>
502502
JAVASSIST (MyBatis 3.3 or above)

src/site/ja/xdoc/configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
522522
Lazy Loading(遅延読み込み)に対応したオブジェクトを生成する際に使用するプロクシツールを指定します。
523523
</td>
524524
<td>
525-
CGLIB | JAVASSIST
525+
CGLIB (3.5.10 以降非推奨) | JAVASSIST
526526
</td>
527527
<td>
528528
JAVASSIST (MyBatis 3.3 以上)

src/site/ko/xdoc/configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
507507
마이바티스가 지연로딩을 처리할 객체를 생성할 때 사용할 프록시 툴을 명시
508508
</td>
509509
<td>
510-
CGLIB | JAVASSIST
510+
CGLIB (deprecated since 3.5.10) | JAVASSIST
511511
</td>
512512
<td>
513513
JAVASSIST (마이바티스 3.3과 이상의 버전)

src/site/xdoc/configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ SqlSessionFactory factory =
583583
Specifies the proxy tool that MyBatis will use for creating lazy loading capable objects.
584584
</td>
585585
<td>
586-
CGLIB | JAVASSIST
586+
CGLIB (deprecated since 3.5.10) | JAVASSIST
587587
</td>
588588
<td>
589589
JAVASSIST (MyBatis 3.3 or above)

src/site/zh/xdoc/configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
514514
指定 Mybatis 创建可延迟加载对象所用到的代理工具。
515515
</td>
516516
<td>
517-
CGLIB | JAVASSIST
517+
CGLIB (deprecated since 3.5.10) | JAVASSIST
518518
</td>
519519
<td>
520520
JAVASSIST (MyBatis 3.3 以上)

0 commit comments

Comments
 (0)