All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.ibatis.solon.integration.MybatisPluginManager Maven / Gradle / Ivy

There is a newer version: 3.0.0-M4
Show newest version
package org.apache.ibatis.solon.integration;

import org.apache.ibatis.plugin.Interceptor;
import org.noear.solon.Solon;

import java.util.List;

/**
 * 插件管理器
 *
 * @author noear
 * @since 1.5
 */
public class MybatisPluginManager {
    private static List interceptors;

    public static List getInterceptors() {
        tryInit();

        return interceptors;
    }

    private static void tryInit() {
        if (interceptors != null) {
            return;
        }

        //支持两种配置
        interceptors = MybatisPluginUtils.resolve(Solon.cfg(), "mybatis.plugin");
        if(interceptors.size() == 0){
            //新加
            interceptors = MybatisPluginUtils.resolve(Solon.cfg(), "mybatis.plugins");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy