Skip to content

idea about make MBG more pluggable #1073

@ningpp

Description

@ningpp

current behavior:
targetRuntime determines what type of IntrospectedTable to create,
IntrospectedTable use generators to gen 'base' files.
eg. when targetRuntime = MyBatis3DynamicSql, IntrospectedTableMyBatis3DynamicSqlImpl
use DynamicSqlMapperGenerator, DynamicSqlSupportClassGenerator and DynamicSqlModelGenerator
to gen XxxModelMapper XxxModelDynamicSqlSupport and XxxModel

my idea is treat targetRuntime as an composite plugin
eg. when targetRuntime = MyBatis3DynamicSql mbg will use MyBatis3DynamicSqlCompositePlugn
to gen files, it actually use DynamicSqlMapperGeneratorPlugin,
DynamicSqlSupportClassGeneratorPlugin and DynamicSqlModelGeneratorPlugin to gen files.

what's next?

IntrospectedTable no longer need methods such as calculateGenerators, getGeneratedJavaFiles...

IntrospectedTable only store table metadata, Plugins for generate various files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions