dataSource or dataSourceClassName or jdbcUrl is required
除了检查application.yml还要检查config的问题
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
这样子的问题大概是配置类上的注解少了一个参数
sqlSessionFactoryRef = "sqlSessionFactory1"
The bean 'sqlSessionFactory', defined in class path resource [com/mybatis/config/DBTwoConfig.class], could not be registered. A bean with that name has already been defined in class path resource [com/mybatis/config/DBOneConfig.class] and overriding is disabled.
这个问题的原因是两个配置类的方法是一样的,底层找不到对应的方法
template的方法名也不能一样