We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plus-3.5.10.1, join1.5.2, springboot2
项目mybatis升级 mybatis-plus + mybatis plus join 原mybatis是进行手动配置
// 生成 sqlSession private void registerSqlSessionFactory(String name, DataSource dataSource) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(MybatisSqlSessionFactoryBean.class.getName()); builder.addPropertyValue("dataSource", dataSource); builder.setInitMethodName("getObject"); builder.addPropertyValue("typeAliasesPackage", properties.getMybatisTypeAliasesPackage()); builder.addPropertyValue("typeHandlersPackage", properties.getMybatisTypeHandlersPackage()); GlobalConfig globalConfig = new GlobalConfig(); globalConfig.setSqlInjector(new MPJSqlInjector()); builder.addPropertyValue("globalConfig", globalConfig); // TODO: VFS.addImplClass(SpringResourceVFS.class); builder.addPropertyValue("plugins", createInterceptors()); builder.addPropertyValue("mapperLocations", scanMapperResources()); DatabaseIdProvider databaseIdProvider = createDatabaseIdProvider(); builder.addPropertyValue("databaseIdProvider", databaseIdProvider); SmartContext.con.register(name, builder.getRawBeanDefinition()); } // 注入自定义插件 private Interceptor[] createInterceptors() { List<Interceptor> interceptors = SmartContext.con.getBeans(Interceptor.class); int useDefinedSize = interceptors.size(); Interceptor[] interceptorArr = new Interceptor[useDefinedSize + 3]; if (interceptors.size() > 0) { // user defined interceptors System.arraycopy(interceptors.toArray(new Interceptor[]{}), 0, interceptorArr, 0, useDefinedSize); } SQLExecuteLogInterceptor logInterceptor = new SQLExecuteLogInterceptor(properties.isMybatisLoggingEnable(), properties.getMybatisLoggingThreshold()); MybatisPlusInterceptor pagingInterceptor = new MybatisPlusInterceptor(); pagingInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); interceptorArr[useDefinedSize] = logInterceptor; interceptorArr[useDefinedSize+1] = pagingInterceptor; interceptorArr[useDefinedSize+2] = new MPJInterceptor(); return interceptorArr; }
Caused by: java.lang.NoSuchMethodException: com.github.yulichang.autoconfigure.MybatisPlusJoinAutoConfiguration.<init>() .....
The text was updated successfully, but these errors were encountered:
No branches or pull requests
确认
当前程序版本
plus-3.5.10.1, join1.5.2, springboot2
问题描述
项目mybatis升级 mybatis-plus + mybatis plus join
原mybatis是进行手动配置
详细堆栈日志
Caused by: java.lang.NoSuchMethodException: com.github.yulichang.autoconfigure.MybatisPlusJoinAutoConfiguration.<init>() .....
The text was updated successfully, but these errors were encountered: