com.baomidou.mybatisplus.core.MybatisConfiguration Java Examples

The following examples show how to use com.baomidou.mybatisplus.core.MybatisConfiguration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SqlHelperMybatisPlusAutoConfiguration.java    From sqlhelper with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void customize(MybatisConfiguration configuration) {
    logger.info("Start to customize mybatis-plus configuration with mybatis-plus-boot-starter");
    configuration.setDefaultScriptingLanguage(CustomMybatisPlusScriptLanguageDriver.class);

    SqlHelperMybatisPlugin plugin = new SqlHelperMybatisPlugin();
    plugin.setPaginationConfig(sqlHelperMybatisProperties.getPagination());
    plugin.setInstrumentorConfig(sqlHelperMybatisProperties.getInstrumentor());
    plugin.init();

    logger.info("Add interceptor {} to mybatis-plus configuration", plugin);
    logger.info("The properties of the mybatis-plus plugin [{}] is: {}", Reflects.getFQNClassName(SqlHelperMybatisPlugin.class), sqlHelperMybatisProperties);
    configuration.addInterceptor(plugin);
}