org.jbatis.dds.solon.starter.config.XPluginAuto Maven / Gradle / Ivy
package org.jbatis.dds.solon.starter.config;
import org.jbatis.dds.kernel.annotation.transactional.MongoTransactional;
import org.jbatis.dds.kernel.cache.global.MongoClientCache;
import org.jbatis.dds.solon.starter.property.MongoDBFieldProperty;
import org.jbatis.dds.solon.starter.transactional.MongoTransactionalAspect;
import org.noear.solon.core.AppContext;
import org.noear.solon.core.Plugin;
/**
* 使用插件处理配置
*
**/
public class XPluginAuto implements Plugin {
@Override
public void start(AppContext context) throws Throwable {
context.beanMake(MongoPlusConfiguration.class);
context.beanInterceptorAdd(MongoTransactional.class,new MongoTransactionalAspect(MongoClientCache.mongoClient));
context.beanMake(MongoDBFieldProperty.class);
}
}