mybatis MappedStatement类中有个方法getBoundSql()返回对象是BoundSql ,怎么用我自己生成的BoundSql对象来替换getBoundSql(Object parameterObject)方法的返回?
public BoundSql getBoundSql(Object parameterObject) {
BoundSql boundSql = sqlSource.getBoundSql(parameterObject);
List parameterMappings = boundSql.getParameterMappings();
if (parameterMappings == null || parameterMappings.size() <= 0) {
boundSql = new BoundSql(configuration, boundSql.getSql(), parameterMap.getParameterMappings(), parameterObject);
}
// check for nested result maps in parameter mappings (issue #30)
for (ParameterMapping pm : boundSql.getParameterMappings()) {
String rmId = pm.getResultMapId();
if (rmId != null) {
ResultMap rm = configuration.getResultMap(rmId);
if (rm != null) {
hasNestedResultMaps |= rm.hasNestedResultMaps();
}
}
}
return boundSql;
}
最后
以上就是热心山水最近收集整理的关于java中返回值为什么为零_java中怎么修改方法的返回值0的全部内容,更多相关java中返回值为什么为零_java中怎么修改方法内容请搜索靠谱客的其他文章。
发表评论 取消回复