【发布时间】:2020-05-15 08:57:42
【问题描述】:
我需要使用 "ObjectId" 对象的 "getCounter()" 方法,但目前它发现已弃用,我无法使用该方法覆盖 sonarqube覆盖范围,有什么方法可以代替“getCounter()”吗?
ObjectId objectId= new ObjectId(idMongo);
int counter = objectId.getCounter();
ObjectId 类中的方法
/** @deprecated */
@Deprecated
public int getCounter() {
return this.counter;
}
【问题讨论】:
标签: java mongodb spring-boot spring-webflux