com.fhs.trans.config.EasyTransPlugin Maven / Gradle / Ivy
package com.fhs.trans.config;
import com.fhs.core.trans.anno.TransMethodResult;
import com.fhs.trans.interceptor.TransInterceptor;
import com.fhs.trans.listener.TransMessageListener;
import com.fhs.trans.service.impl.RpcTransService;
import org.noear.solon.core.AopContext;
import org.noear.solon.core.Plugin;
public class EasyTransPlugin implements Plugin {
@Override
public void start(AopContext context) {
//增加云启用控制
if (context.getProps().getBool("easy-trans.enable-cloud", false)) {
context.beanMake(TransMessageListener.class);
context.beanMake(RpcTransService.class);
context.beanScan("com.fhs.trans.controller");
}
context.beanAroundAdd(TransMethodResult.class, new TransInterceptor());
context.beanScan("com.fhs.trans.config");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy