Skip to content

Deprecate CGLIB proxy factory #2499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

/**
* @author Clinton Begin
* @deprecated Since 3.5.10, use Javassist instead.
*/
@Deprecated
public class CglibProxyFactory implements ProxyFactory {

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

static Object crateProxy(Class<?> type, Callback callback, List<Class<?>> constructorArgTypes, List<Object> constructorArgs) {
LogHolder.log.warn("CglibProxyFactory is deprecated. Use another proxy factory implementation.");
Enhancer enhancer = new Enhancer();
enhancer.setCallback(callback);
enhancer.setSuperclass(type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

/**
* @author Eduardo Macarron
* @deprecated Since 3.5.10, use Javassist instead.
*/
@Deprecated
class CglibSerialStateHolder extends AbstractSerialStateHolder {

private static final long serialVersionUID = 8940388717901644661L;
Expand Down
2 changes: 1 addition & 1 deletion src/site/es/xdoc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
Permite especificar qué herramienta de generación de proxys se usará para crear los objetos con capacidad de carga lazy.
</td>
<td>
CGLIB | JAVASSIST
CGLIB (deprecated since 3.5.10) | JAVASSIST
</td>
<td>
JAVASSIST (MyBatis 3.3 or above)
Expand Down
2 changes: 1 addition & 1 deletion src/site/ja/xdoc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
Lazy Loading(遅延読み込み)に対応したオブジェクトを生成する際に使用するプロクシツールを指定します。
</td>
<td>
CGLIB | JAVASSIST
CGLIB (3.5.10 以降非推奨) | JAVASSIST
</td>
<td>
JAVASSIST (MyBatis 3.3 以上)
Expand Down
2 changes: 1 addition & 1 deletion src/site/ko/xdoc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
마이바티스가 지연로딩을 처리할 객체를 생성할 때 사용할 프록시 툴을 명시
</td>
<td>
CGLIB | JAVASSIST
CGLIB (deprecated since 3.5.10) | JAVASSIST
</td>
<td>
JAVASSIST (마이바티스 3.3과 이상의 버전)
Expand Down
2 changes: 1 addition & 1 deletion src/site/xdoc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ SqlSessionFactory factory =
Specifies the proxy tool that MyBatis will use for creating lazy loading capable objects.
</td>
<td>
CGLIB | JAVASSIST
CGLIB (deprecated since 3.5.10) | JAVASSIST
</td>
<td>
JAVASSIST (MyBatis 3.3 or above)
Expand Down
2 changes: 1 addition & 1 deletion src/site/zh/xdoc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
指定 Mybatis 创建可延迟加载对象所用到的代理工具。
</td>
<td>
CGLIB | JAVASSIST
CGLIB (deprecated since 3.5.10) | JAVASSIST
</td>
<td>
JAVASSIST (MyBatis 3.3 以上)
Expand Down