QueryBuilder 类型的方法 andProperty(String) 已弃用 - Javers
The method andProperty(String) from the type QueryBuilder is deprecated - Javers
我正在从 link 开发 Spring Boot Javers integrations
:https://javers.org/documentation/spring-boot-integration/,属性 API 已被弃用,有什么替代品?
@GetMapping("/audit")
public String getPersonChanges(@RequestParam Optional<String> param) {
QueryBuilder jqlQuery = QueryBuilder.byClass(Person.class);
jqlQuery = param.isPresent() ? jqlQuery.andProperty(param.get()) : jqlQuery;
List<Change> changes = javers.findChanges(jqlQuery.build());
changes.sort((o1, o2) -> -1 * o1.getCommitMetadata().get().getCommitDate().compareTo(o2.getCommitMetadata().get().getCommitDate()));
JsonConverter jsonConverter = javers.getJsonConverter();
return jsonConverter.toJson(changes);
}
The method andProperty(String) from the type QueryBuilder is deprecated
Maven 依赖项:
<dependency>
<groupId>org.javers</groupId>
<artifactId>javers-spring-boot-starter-sql</artifactId>
<version>5.6.2</version>
</dependency>
有关此方法替换的信息在其 javadoc 中明确给出:
/**
* renamed to {@link #withChangedProperty(String)}
* @deprecated
*/
@Deprecated
public QueryBuilder andProperty(String propertyName) {
return withChangedProperty(propertyName);
}
我正在从 link 开发 Spring Boot Javers integrations
:https://javers.org/documentation/spring-boot-integration/,属性 API 已被弃用,有什么替代品?
@GetMapping("/audit")
public String getPersonChanges(@RequestParam Optional<String> param) {
QueryBuilder jqlQuery = QueryBuilder.byClass(Person.class);
jqlQuery = param.isPresent() ? jqlQuery.andProperty(param.get()) : jqlQuery;
List<Change> changes = javers.findChanges(jqlQuery.build());
changes.sort((o1, o2) -> -1 * o1.getCommitMetadata().get().getCommitDate().compareTo(o2.getCommitMetadata().get().getCommitDate()));
JsonConverter jsonConverter = javers.getJsonConverter();
return jsonConverter.toJson(changes);
}
The method andProperty(String) from the type QueryBuilder is deprecated
Maven 依赖项:
<dependency>
<groupId>org.javers</groupId>
<artifactId>javers-spring-boot-starter-sql</artifactId>
<version>5.6.2</version>
</dependency>
有关此方法替换的信息在其 javadoc 中明确给出:
/**
* renamed to {@link #withChangedProperty(String)}
* @deprecated
*/
@Deprecated
public QueryBuilder andProperty(String propertyName) {
return withChangedProperty(propertyName);
}