添加 SuppressWarnings

This commit is contained in:
yulichang 2024-07-30 05:40:45 +08:00
parent 4f3f6dac3f
commit 30924c4810
2 changed files with 10 additions and 0 deletions

View File

@ -92,6 +92,7 @@ public class MPJSqlInjector extends DefaultSqlInjector {
*/ */
@Override @Override
@Deprecated @Deprecated
@SuppressWarnings({"deprecation", "DeprecatedIsStillUsed"})
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) { public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
if (Objects.nonNull(sqlInjector)) { if (Objects.nonNull(sqlInjector)) {
return methodFilter(sqlInjector.getMethodList(mapperClass, tableInfo)); return methodFilter(sqlInjector.getMethodList(mapperClass, tableInfo));

View File

@ -84,12 +84,21 @@ public class MybatisPlusConfig {
} }
@Override @Override
@SuppressWarnings("deprecation")
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) { public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> list = super.getMethodList(mapperClass, tableInfo); List<AbstractMethod> list = super.getMethodList(mapperClass, tableInfo);
//添加你的方法 //添加你的方法
list.add(new InsertBatchSomeColumn()); list.add(new InsertBatchSomeColumn());
return list; return list;
} }
@Override
public List<AbstractMethod> getMethodList(org.apache.ibatis.session.Configuration configuration, Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> list = super.getMethodList(configuration, mapperClass, tableInfo);
//添加你的方法
list.add(new InsertBatchSomeColumn());
return list;
}
}; };
} }