Solon v2.7.5

solon.proxy

native </> markdown
<dependency>
    <groupId>org.noear</groupId>
    <artifactId>solon.proxy</artifactId>
</dependency>

1、描述

基础扩展插件,提供为 Solon 提供类动态代理的能力(内置有 asm 实现)。具有类动态代理能力的Bean,才能支持对Method拦截。进而支持@Tran@Cache等AOP功能。

代码上主要扩展实现了内核的 ProxyBinder::binding 接口。

2、代码应用

@Component
public class DemoService{
    @Inject
    UserMapper userMapper;

    @Tran
    public void test(User user){
        userMapper.add(user);
    }
}