@Bean @ConditionalOnMissingBean public cn.mybatisboost.core.Configuration configuration() throws IllegalAccessException, InstantiationException { cn.mybatisboost.core.Configuration.Builder builder = cn.mybatisboost.core.Configuration.builder() .setMultipleDatasource(properties.isMultipleDatasource()) .setIterateSelectiveInBatch(properties.isIterateSelectiveInBatch()) .setShowQuery(properties.isShowQuery()) .setShowQueryWithParameters(properties.isShowQueryWithParameters()) .setSlowQueryThresholdInMillis(properties.getSlowQueryThresholdInMillis()); if (properties.getNameAdaptor() != null) { builder.setNameAdaptor(properties.getNameAdaptor().newInstance()); } else { builder.setNameAdaptor(new NoopNameAdaptor()); } if (properties.getSlowQueryHandler() != null) { builder.setSlowQueryHandler(properties.getSlowQueryHandler().newInstance()); } return builder.build(); }