-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Open
Description
@OverRide
public List selectByExample(Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
Object result = selectByExample.invoke(mapper, example);
return (List) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
所有异常都给捕获了,并且也没打印日志,为啥不把异常抛给controller处理
Metadata
Metadata
Assignees
Labels
No labels