Springboot 中 druid mybatisplus 配置过多数据源后 查询sqlserver 通过xml可以查到 但是通过接口selectList查询 也不报错 也没有查询到
mapper
public interface sqlServerMapper extends BaseMapper<RefDataEntity> {
List<RefDataEntity> getMySqlserver();
}
controller
@RequestMapping(value = "/RefSelect")
@ResponseBody
public Map<String, Object> RefSelect() {
// List<RefDataEntity> mySqlserver = serverMapper.getMySqlserver();
RefDataEntity refDataEntity = serverMapper.selectById("1");
System.out.println(refDataEntity);
return null;
}
控制台输出
controller换成正常的xml请求数据
@RequestMapping(value = "/RefSelect")
@ResponseBody
public Map<String, Object> RefSelect() {
List<RefDataEntity> mySqlserver = serverMapper.getMySqlserver();
// RefDataEntity refDataEntity = serverMapper.selectById("1");
// System.out.println(refDataEntity);
return null;
}
控制台输出