对我来说,错误的原因是因为没有配置:mybatis.mapperLocations=classpath:mybatis/mapper/*Mapper.xmlmybatis.config-location=classpath:mybatis/mybatis-config.xml导致主库是可以正常连接数据库会员分库则报出Invalid bound statement (not found) 错