@Override
    public void initialized(IntrospectedTable introspectedTable) {
        // 1. 首先获取全局配置
        this.prefix = getProperties().getProperty(PRO_PREFIX);
        // 2. 获取每个table 具体的
        if (introspectedTable.getTableConfigurationProperty(PRO_PREFIX) != null) {
            this.prefix = introspectedTable.getTableConfigurationProperty(PRO_PREFIX);
        }
        // 3. 判断是否配置了前缀
        // !!! TableRenamePlugin 插件的 tableOverride 优先级最高
        if (this.prefix != null && introspectedTable.getTableConfigurationProperty(TableRenamePlugin.PRO_TABLE_OVERRIDE) == null) {
            String domainObjectName = introspectedTable.getFullyQualifiedTable().getDomainObjectName();
            domainObjectName = prefix + domainObjectName;
            try {
                IntrospectedTableTools.setDomainObjectName(introspectedTable, getContext(), domainObjectName);
            } catch (Exception e) {
                logger.error("itfsw:插件" + this.getClass().getTypeName() + "使用prefix替换时异常！", e);
            }
        }
        super.initialized(introspectedTable);
    }
@Override
    public void initialized(IntrospectedTable introspectedTable) {
        
        this.prefix = getProperties().getProperty(PRO_PREFIX);
        
        if (introspectedTable.getTableConfigurationProperty(PRO_PREFIX) != null) {
            this.prefix = introspectedTable.getTableConfigurationProperty(PRO_PREFIX);
        }
        
        
        if (this.prefix != null && introspectedTable.getTableConfigurationProperty(TableRenamePlugin.PRO_TABLE_OVERRIDE) == null) {
            String domainObjectName = introspectedTable.getFullyQualifiedTable().getDomainObjectName();
            domainObjectName = prefix + domainObjectName;
            try {
                IntrospectedTableTools.setDomainObjectName(introspectedTable, getContext(), domainObjectName);
            } catch (Exception e) {
                logger.error("itfsw:插件" + this.getClass().getTypeName() + "使用prefix替换时异常！", e);
            }
        }
        super.initialized(introspectedTable);
    }
@ Override public void initialized ( IntrospectedTable introspectedTable ) { // 1. 首先获取全局配置 this . prefix = getProperties ( ) . getProperty ( PRO_PREFIX ) ; // 2. 获取每个table 具体的 if ( introspectedTable . getTableConfigurationProperty ( PRO_PREFIX ) != null ) { this . prefix = introspectedTable . getTableConfigurationProperty ( PRO_PREFIX ) ; } // 3. 判断是否配置了前缀 // !!! TableRenamePlugin 插件的 tableOverride 优先级最高 if ( this . prefix != null && introspectedTable . getTableConfigurationProperty ( TableRenamePlugin . PRO_TABLE_OVERRIDE ) == null ) { String domainObjectName = introspectedTable . getFullyQualifiedTable ( ) . getDomainObjectName ( ) ; domainObjectName = prefix + domainObjectName ; try { IntrospectedTableTools . setDomainObjectName ( introspectedTable , getContext ( ) , domainObjectName ) ; } catch ( Exception e ) { logger . error ( "itfsw:插件" + t i .get C lass().g e t T ypeName() + " 用 refix替换时异常！", e); } } super . initialized ( introspectedTable ) ; }
初始化阶段
具体执行顺序 http://www.mybatis.org/generator/reference/pluggingIn.html
@param introspectedTable
@return
初始化阶段 具体执行顺序 http : // www . mybatis . org / generator / reference / pluggingIn . html