Example usage for org.apache.ibatis.plugin Interceptor setProperties

List of usage examples for org.apache.ibatis.plugin Interceptor setProperties

Introduction

In this page you can find the example usage for org.apache.ibatis.plugin Interceptor setProperties.

Prototype

default void setProperties(Properties properties) 

Source Link

Usage

From source file:cc.oit.dao.impl.mybatis.session.XMLConfigBuilder.java

License:Apache License

private void pluginElement(XNode parent) throws Exception {
    if (parent != null) {
        for (XNode child : parent.getChildren()) {
            String interceptor = child.getStringAttribute("interceptor");
            Properties properties = child.getChildrenAsProperties();
            Interceptor interceptorInstance = (Interceptor) resolveClass(interceptor).newInstance();
            interceptorInstance.setProperties(properties);
            configuration.addInterceptor(interceptorInstance);
        }/*from   w w w.jav  a 2 s.  com*/
    }
}