Fixes the problem of the "Using filters" link jumping to the top of
the document. There was another of these ("Configuration") later in
the document, and this commit fixes that one, too.
Original pull request: #470.
DomainClassConverter now delays the initialization of the Repositories instances used to avoid the premature initialization of repository instances as that can cause deadlocks if the infrastructure backing the repositories is initialized on a separate thread.
Refactored nested converter classes to allow them to be static ones.
Related issues: spring-projects/spring-boot#16230, spring-projects/spring-framework#25131.
Original pull request: #445.
We now avoid a type reference to XmlBeamHttpMessageConverter in a field within SpringDataWebConfiguration to avoid a type reference to a potentially unresolvable type. This seems to have caused issues on certain JDK 14 builds [0].
[0] https://github.com/spring-projects/spring-framework/issues/25050
Reorder constructor filtering with the goal to delay/avoid potentially expensive PersistenceConstructor creation with parameter lookup as much as possible.
The lookup is (in a default setup) only done once per domain type, but depending on the number of entities to inspect the change can help save some cycles for larger domains.
Before:
Benchmark Mode Cnt Score Error Units
EntityMetadataBenchmark.alwaysNew thrpt 10 224318,163 ± 42542,453 ops/s
After:
Benchmark Mode Cnt Score Error Units
EtityMetadataBenchmark.alwaysNew thrpt 10 420053,505 ± 9288,093 ops/s
public class DomainType {
private String id;
private @Id String theId;
private String firstname, lastname;
private Integer age;
public DomainType(String id, String theId, String firstname, String lastname, Integer age) {
this.id = id;
this.theId = theId;
this.firstname = firstname;
this.lastname = lastname;
this.age = age;
}
@PersistenceConstructor
public DomainType(String firstname, String lastname) {
this.firstname = firstname;
this.lastname = lastname;
}
}
Original pull request: #440.
We now use the correct quotation map that is based on the rewritten SpEL query to detect whether an expression was quoted.
Previously, we used the quotation map from the original query.
After augmenting the query with synthetic parameters, the quotation offset no longer matched the query that ß∑was under inspection and calls to SpelExtractor.isQuoted(…) could report an improper result.
Original pull request: #434.