Skip to content

Ability to pass custom subclassed configuration to XMLConfigBuilder #2724

Closed
@epochcoder

Description

@epochcoder

We would like to have the ability to pass a custom configuration to XMLConfigBuilder like:

    public XMLConfigBuilder(Configuration configuration, XPathParser parser, String environment, Properties props) {
        super(configuration);
        ErrorContext.instance().resource("SQL Mapper Configuration");
        this.configuration.setVariables(props);
        this.parsed = false;
        this.environment = environment;
        this.parser = parser;
    }

We have been using it for quite some time by making a duplicate of XMLConfigBuilder and using it via SqlSessionFactoryBuilder, however this creates some duplicate code and we would like to use the upstream XMLConfigBuilder

If there is any other way to provide a custom Configuration that I am missing, please let me know, we are using a subclass of configuration to provide a custom StatementHandler via newStatementHandler

Metadata

Metadata

Assignees

Labels

enhancementImprove a feature or add a new feature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions