Commit Graph

2294 Commits

Author SHA1 Message Date
Mark Paluch
130db32194 Polishing.
Introduce factory methods on Pageable, PageRequest, and QPageRequest to construct PageRequest objects. Replace builder with with…(…) methods.

Closes #322.
2021-01-28 15:47:52 +01:00
Anastasiia Smirnova
2db26d2765 Add PageRequest builder.
We now support PageRequest creation through PageRequest.ofSize(10).withPage(1).withSort(Direction.DESC, "foo"). Simplified Pageable instances can be created through Pageable.ofSize(10).withPage(1).

Closes #322.
2021-01-28 15:46:34 +01:00
Mark Paluch
d4b8e38622 Polishing.
Attach repository interface name to each repository init event.

Make spring.data.repository.postprocessors conditional to reduce the number of events. Append full fragment diagnostics.

Reorder methods, add author tag, reformat code.

Closes #2247.
Original pull request: #2273.
2021-01-28 15:04:23 +01:00
Christoph Strobl
7d7f62f703 Add repository initialization metrics.
This commit adds support for collecting data repository startup metric (repository scanning, repository initialization) using core framework ApplicationStartup and StartupStep.
Collected metrics can be stored with Java Flight Recorder when using a FlightRecorderApplicationStartup.

Closes #2247.
Original pull request: #2273.
2021-01-28 15:04:23 +01:00
Oliver Drotbohm
584464807e Upgrade to Servlet 4.0 to align with Spring Framework.
Also, tweak test case to avoid to refer to a field in a Spring class but rather use API to access the value. Changes in Spring Framework 5.3.4 require this as the internal structure of AbstractJackson2HttpMessageConverter changed to support custom ObjectMapper instances per type and media type.

Fixes GH-2284.
2021-01-26 23:00:51 +01:00
Valeriy.Vyrva
b2fe6d3d22 Convert Vavr Seq to list with asJava method.
asJava(…) creates a read-only view instead of copying elements into a new List.

Closes #2217
Original pull request: #287
2021-01-26 10:38:52 +01:00
Oliver Drotbohm
1e13d40cbb Avoid pre-computing base URI in PagedResourceAssemblerArgumentResolver.
We now avoid the pre-computation of the base URI in PagedResourceAssemblerArgumentResolver as the actual assembler will fall back to using the URI of the current request by default anyway. The latter makes sure that request parameters, that are contained in the original requests appear in links created. If a controller wants to deviate from that behavior, they can create a dedicated link themselves and hand that to the assembler explicitly.

Fixes GH-2173, GH-452.
2021-01-26 10:00:52 +01:00
Mark Paluch
3d7cabf814 Guard potential null dereference in recursive initialization calls.
We now assign the repository field before resolving the persistent entity through the mapping context to avoid a potential NPE caused by a getObject(…) invocation through an application event.

Closes #2068
2021-01-26 09:47:37 +01:00
Mark Paluch
89c5b3839c Enable QuerydslPredicate for meta-annotation usage.
We now support composed annotations that are meta-annotated with QuerydslPredicate.

Resolves #2277.
2021-01-25 16:20:55 +01:00
Mark Paluch
d57fb3ea0e DATACMNS-1785 - Polishing.
Introduce constructors accepting non-null ConversionService, handle conversion service defaulting in configuration classes by using ObjectProvider. Extract common code to create a predicate in getPredicate(…) method. Add unit test.

Convert spaces to tabs.

Related ticket: #2200.
Original pull request: #2274.
2021-01-25 15:52:50 +01:00
Matías Hermosilla
a83969005b DATACMNS-1785 - Add ReactiveQuerydslPredicateArgumentResolver and ReactiveQuerydslWebConfiguration.
We now provide ReactiveQuerydslPredicateArgumentResolver to resolve Querydsl Predicates when using Spring WebFlux.

Related ticket: #2200.
Original pull request: #2274.
2021-01-25 15:52:30 +01:00
Mark Paluch
a8b5f43f1e Filter spring-issuemaster comments from feedback provided reassignment.
See #2263
2021-01-20 14:50:10 +01:00
Mark Paluch
ce4558fc4b Fix constructor resolution for Kotlin classes using unsigned types.
We now leniently skip parameter name resolution for types using unsigned types. The issue is caused by Kotlin's DefaultConstructorMarker that doesn't report a parameter name.

Closes #2215
2021-01-18 13:46:31 +01:00
Mark Paluch
4401604f11 Filter spring-issuemaster comments from feedback provided reassignment.
See #2263
2021-01-14 11:05:06 +01:00
Christoph Strobl
af287fefbc After release cleanups.
See #2258
2021-01-13 15:47:00 +01:00
Christoph Strobl
31957309df Prepare next development iteration.
See #2258
2021-01-13 15:46:58 +01:00
Christoph Strobl
4a4fe1549b Release version 2.5 M2 (2021.0.0).
See #2258
2021-01-13 15:34:04 +01:00
Christoph Strobl
d65f0f29dd Prepare 2.5 M2 (2021.0.0).
See #2258
2021-01-13 15:33:34 +01:00
Christoph Strobl
c2158d3975 Updated changelog.
See #2258
2021-01-13 15:33:27 +01:00
Christoph Strobl
ec2b8e5311 Updated changelog.
See #2259
2021-01-13 15:16:18 +01:00
Jens Schauder
dc09d5d34d Add JSR310 converters to the converters used for projections.
Similar converters where removed because they clashed with the support for nullable wrappers. This adds them back as dedicated converters that does not clash with conversions for nullable wrappers.

See bd3992dfc5 (diff-96f7084777a2a702d85f5c600e542b10123d6c3332ed3d3f8e329ca7061faab0R55)

Original Pull Request: #479
Closes: #2223
2021-01-13 07:03:44 +01:00
Mark Paluch
efe93e31b1 Polishing.
Reuse definitive path flag without recompile the expression.

See #2270
2021-01-12 15:50:51 +01:00
Mark Paluch
037df8e3ae Correctly unwrap nested JSON array projections.
We now check for double-nesting of JSON path evaluation results when the return type is a collection. If the result is double-wrapped and the nested object is a collection then we unwrap it.

Closes #2270
2021-01-12 15:50:50 +01:00
Mark Paluch
2bf5e53a3b DATACMNS-1835 - Provide Type-safe Kotlin query extension.
We now provide a KProperty extension leveraging KProperty references to express a property path. Using Kotlin property references (such as Author::name that translates to `book` or Book::author / Author.name translating to `book.author`) is refactoring-safe as the property expressions are part of the Kotlin language. We render KPropertyPath using the same semantics as our PropertyPath so that store-specific modules can leverage either property paths or accept KProperty directly.

In contrast to the previous implementation, KPropertyPath is private and the rendering function was renamed to toDotPath to align with PropertyPath.toDotPath.

Related ticket: DATAMONGO-2138 (spring-projects/spring-data-mongodb#3515)
Original Pull Request: #478
Closes: #2250
2021-01-12 13:55:42 +01:00
Mark Paluch
e8ce3b04b0 Upgrade to XMLBeam 1.4.18.
Closes #2269
2021-01-07 14:28:49 +01:00
Mark Paluch
8bd2f9bf34 Update copyright year to 2021.
Closes #2268.
2021-01-07 13:42:27 +01:00
Michael Simons
440d9b6f81 Polishing.
See #2263
Original pull request #2267
2021-01-07 11:21:31 +01:00
Mark Paluch
ac45422e6d #2263 - Update repository after GitHub issues migration. 2020-12-31 10:36:10 +01:00
Greg L. Turnquist
fa5906ccec DATACMNS-1841 - Polishing. 2020-12-15 12:25:55 -06:00
Greg L. Turnquist
c4697a73d6 DATACMNS-1841 - Use Docker hub credentials for all CI jobs. 2020-12-09 16:30:15 -06:00
Mark Paluch
89d5c052be DATACMNS-1831 - Updated changelog. 2020-12-09 16:47:38 +01:00
Mark Paluch
c3df15fd7a DATACMNS-1824 - After release cleanups. 2020-12-09 15:32:19 +01:00
Mark Paluch
a9af34e9f6 DATACMNS-1824 - Prepare next development iteration. 2020-12-09 15:32:15 +01:00
Mark Paluch
456671e4b8 DATACMNS-1824 - Release version 2.5 M1 (2021.0.0). 2020-12-09 15:21:55 +01:00
Mark Paluch
8068d43c8d DATACMNS-1824 - Prepare 2.5 M1 (2021.0.0). 2020-12-09 15:21:28 +01:00
Mark Paluch
ab8fcd9951 DATACMNS-1824 - Updated changelog. 2020-12-09 15:21:25 +01:00
Mark Paluch
f20ce66236 DATACMNS-1822 - Updated changelog. 2020-12-09 12:42:22 +01:00
Mark Paluch
210fcd762b DATACMNS-1821 - Updated changelog. 2020-12-09 09:59:07 +01:00
Jens Schauder
2638920708 DATACMNS-1818 - Simplifies the documentation a little.
Reduces the technical jargon in the introduction section for custom implementations.
2020-12-08 14:25:38 +01:00
Mark Paluch
71b92bc3f9 DATACMNS-1838 - Accept ExpressionDependencies in BasicPersistentEntity.getEvaluationContext(…).
Allow obtaining an EvaluationContext with a reduced set of extensions that are required for ExpressionDependencies instead of initializing all extensions.
2020-12-07 11:26:58 +01:00
Mark Paluch
6616f6e577 DATACMNS-1827 - Polishing.
Extract qualifier lookup into SpringDataAnnotationUtils.

Original pull request: #474.
2020-12-01 10:15:15 +01:00
Vedran Pavic
438b01e161 DATACMNS-1827 - Consider Qualifier meta-annotated Sort method parameters.
Original pull request: #474.
2020-12-01 10:15:08 +01:00
Mark Paluch
eccb067e63 DATACMNS-1837 - Polishing.
Consistent callout indentation. Tweak wording.

Original pull request: #475.
2020-12-01 10:02:38 +01:00
Michael Simons
70c9a0d6e9 DATACMNS-1837 - Add the required override to the example.
The example should be a compilable unit.

Original pull request: #475.
2020-12-01 10:02:38 +01:00
Mark Paluch
8c07f66a74 DATACMNS-1833 - Polishing.
Reformat asciidoc.

Original pull request: #477.
2020-12-01 09:50:07 +01:00
Mark Paluch
7e96c56dbe DATACMNS-1833 - Revise documentation for query method keywords.
Original pull request: #477.
2020-12-01 09:50:02 +01:00
Mark Paluch
c4d2bd5d58 DATACMNS-800 - Add deleteAllById to CoroutineCrudRepository.
Original pull request: #476.
2020-11-26 09:21:03 +01:00
Mark Paluch
ae4f0361af DATACMNS-800 - Polishing.
Update RxJava 2/3 repositories with deleteAllById(…). Reorder methods.

Original pull request: #476.
2020-11-25 09:37:48 +01:00
Jens Schauder
bc76fcb7fc DATACMNS-800 - Adds deleteAllById to ReactiveCrudRepository and CrudRepository.
CrudRepository and ReactiveCrudRepository now expose a deleteAllById(Iterable<ID>) method to delete multiple entities by their Id.

Original pull request: #476.
2020-11-25 09:32:11 +01:00
Mark Paluch
1512e878c4 DATACMNS-1823 - Updated changelog. 2020-11-11 12:34:36 +01:00