Commit Graph

2199 Commits

Author SHA1 Message Date
Mark Paluch
e4a42e9c86 DATACMNS-1787 - Updated changelog. 2020-09-16 12:16:30 +02:00
Mark Paluch
c4b1c49d9d DATACMNS-1774 - Updated changelog. 2020-09-16 11:20:06 +02:00
Mark Paluch
e5be54bd9a DATACMNS-1773 - Updated changelog. 2020-09-16 10:38:56 +02:00
Oliver Drotbohm
96097c290d DATACMNS-1736 - Polishing.
Avoid reuse of Lazy instances for (Sort|Pageable)HandlerMethodArgumentResolver and consistently use those to avoid breaking API changes in configuration classes.
2020-09-15 17:01:20 +02:00
Greg L. Turnquist
9d12ac7324 DATACMNS-1736 - Switch away from overrideable methods. 2020-09-15 17:01:19 +02:00
Mark Paluch
c10072c96f DATACMNS-1736 - Use BeanFactory lookup in configuration classes instead of intercepted local bean methods.
We now use @Configuration(proxyBeanMethods = false) and use BeanFactory bean lookups to avoid CGlib proxy creation.

Using Spring's BeanProvider.getIfUnique(…) instead of catching NoSuchBeanDefinitionException.
2020-09-15 17:01:19 +02:00
Mark Paluch
c85b524508 DATACMNS-1795 - Align checks in ReactiveWrappers with checks in ReactiveAdapterRegistry.
Checks in ReactiveWrappers align now with checks in ReactiveAdapterRegistry for a consistent configuration experience.
2020-09-10 10:35:13 +02:00
Mark Paluch
168583ea3c DATACMNS-1793 - Polishing.
Clean up invalid imports.
2020-09-09 13:42:01 +02:00
Mark Paluch
1a222d7f42 DATACMNS-1794 - Upgrade to XMLBeam 1.4.17. 2020-09-09 13:42:00 +02:00
Mark Paluch
f5e95f58c6 DATACMNS-1775 - Updated changelog. 2020-08-12 13:25:47 +02:00
Mark Paluch
7b9e074f05 DATACMNS-1756 - After release cleanups. 2020-08-12 12:00:22 +02:00
Mark Paluch
45294fca5c DATACMNS-1756 - Prepare next development iteration. 2020-08-12 12:00:19 +02:00
Mark Paluch
d46094b1b6 DATACMNS-1756 - Release version 2.4 M2 (2020.0.0). 2020-08-12 11:52:05 +02:00
Mark Paluch
20d6b79a01 DATACMNS-1756 - Prepare 2.4 M2 (2020.0.0). 2020-08-12 11:51:40 +02:00
Mark Paluch
f5ed286851 DATACMNS-1756 - Updated changelog. 2020-08-12 11:51:17 +02:00
Mark Paluch
fb9dbb0cc2 DATACMNS-1764 - Fix CoroutineAdapterInformation when Kotlin reflection is absent.
We now correctly determine the parameter count instead of returning a stating no-op object to correctly compare whether the target method uses the same count of arguments.

Original Pull Request: #455.
2020-08-11 15:38:04 +02:00
Mark Paluch
01e394b913 DATACMNS-1764 - Polishing.
Move Publisher decoration into its own type to avoid a static reference to Publisher. Fix imperative repository MethodLookups.

Original Pull Request: #455.
2020-08-11 15:03:24 +02:00
Christoph Strobl
b667dfa779 DATACMNS-1764 - Capture reactive invocation on per subscription basis.
Original Pull Request: #455
2020-08-11 13:53:30 +02:00
Mark Paluch
35a3d3cde9 DATACMNS-1764 - Allow registration of RepositoryFactory customizers.
Original Pull Request: #455
2020-08-11 13:41:38 +02:00
Mark Paluch
e77947f0a5 DATACMNS-1763 - Allow registration of QueryMethod invocation listeners.
We now allow for registering RepositoryMethodInvocationListeners to notify listeners upon repository method invocations (query methods and repository fragments). Listeners are notified upon method completion reporting the repository interface, the invoked methods, duration, outcome and arguments.

Original Pull Request: #455
2020-08-11 13:40:57 +02:00
Mark Paluch
d840057b0c DATACMNS-1783 - Simplify null check in PersistentEntityIsNewStrategy.
Switch from Number.class.isInstance(…) method call to instanceof check.
2020-08-11 10:16:28 +02:00
Mark Paluch
e72470993d DATACMNS-1754 - Polishing.
Revert bean name change so all nested repository interface components (repository bean, fragment bean, legacy custom implementation bean) remain prefixed with their enclosing type name.

Adopt tests. Add test for RepositoryBeanDefinitionRegistrar. Extend documentation.

Original pull request: #460.
2020-08-10 16:33:21 +02:00
Kyrylo Merzlikin
2a44d2394c DATACMNS-1754 - Support implementation lookup for nested repositories and fragments.
Problem: while repository and fragment interfaces are discovered
correctly (provided that considerNestedRepositories=true), their
implementations are not found/registered despite proper class naming.

Cause: DefaultImplementationLookupConfiguration works in such way that
for nested interface (i.e. one whose class name includes name of the
enclosing class) expected implementation class name is built including
that enclosing class name. In the same time actual implementation class
names are always "localized" (i.e. stripped from enclosing class name,
if any) before matching. This makes matching implementation classes
against nested interface impossible.

Solution: when building expected implementation class name, use "local"
interface class name, so that it can match any implementation class that
follows naming convention "SimpleInterfaceName" + "ImplemenetationPostfix".

Original pull request: #460.
2020-08-10 16:29:38 +02:00
Oliver Drotbohm
c99f2c9459 DATACMNS-1296 - PersistentPropertyPathAccessor now properly handles intermediate nulls when setting values.
We now use a dedicated GetOptions instance for the lookup of the parent path in case SetOptions is defined to skip nulls so that the lookup does not fail if the parent path contains a null value.
2020-08-06 08:50:20 +02:00
Mark Paluch
cdd8359103 DATACMNS-1781 - Reinstantate PersistentPropertyPathAccessor.setProperty(…).
Reintroduce method that was earlier removed as part of deprecation cleanup.
2020-08-05 08:58:35 +02:00
Mark Paluch
7b26fd199f DATACMNS-1780 - Polishing.
Consistently use MappingException when a required PersistentEntity cannot be obtained.
2020-08-04 15:25:34 +02:00
Mark Paluch
2aae23763b DATACMNS-1780 - Polishing.
Refine Javaoc. Eagerly react to availability of a single MappingContext.

Original pull request: #462.
2020-08-04 14:39:17 +02:00
Christoph Strobl
fd15c099e9 DATACMNS-1780 - PersistentEntities allows in flight metadata creation if the associated mapping context can be identified.
Use a more lenient approach, that allows metadata creation, when looking up persistent entities. This allows eg. a configured AuditingHandler to kick in without having to register an initial entity set in first place.

Original pull request: #462.
2020-08-04 14:39:05 +02:00
Mark Paluch
a600d8160c DATACMNS-1781 - Move off deprecated Spring Framework API.
Use KotlinDetector instead of ReflectionUtils.isKotlinClass(…). Use replacement MethodParameter(…).withContainingClass(…) instead of GenericTypeResolver.resolveParameterType(…). Use MergedAnnotations.from(…).isPresent(…) instead of AnnotationUtils.isAnnotationMetaPresent(…).
2020-08-04 12:16:55 +02:00
Mark Paluch
bb4d621a32 DATACMNS-1779 - Consider kotlin.Unit a simple type.
kotlin.Unit is now considered a simple type to avoid PersistentEntity creation.

ReflectionUtils.isVoid(…) now encapsulates the check so that calling code doesn't need to check if Kotlin is on the class path.
2020-07-31 10:57:56 +02:00
Mark Paluch
837dd0789e DATACMNS-1739 - Use standard Spring code of conduct. 2020-07-28 15:34:22 +02:00
Mark Paluch
45874430d6 DATACMNS-1777 - Polishing.
Use non-null construction of Optional for non-nullable method arguments.
2020-07-28 15:29:36 +02:00
Mark Paluch
9fbabdc820 DATACMNS-1777 - Polishing.
Add note about GraalVM when using TypedSort.

Original pull request: #461.
2020-07-28 15:28:42 +02:00
DK Lee
47ac2d43ff DATACMNS-1777 - Fix typo in Java example for TypedSort.
Original pull request: #461.
2020-07-28 15:28:28 +02:00
Mark Paluch
e56dcdb461 DATACMNS-1726 - Remove Lombok from compile scope.
Use Java ServiceLoader to identify annotation processors.
2020-07-27 12:10:34 +02:00
Christoph Strobl
fb15a9647d DATACMNS-1108 - Polishing.
Move loop to Set lookup, update Javadoc and remove unused imports.

Original Pull Request: #454
2020-07-22 13:47:00 +02:00
Mark Paluch
e9901e7df8 DATACMNS-1108 - Polishing.
Original Pull Request: #454
2020-07-22 13:46:08 +02:00
Mark Paluch
0671862ed8 DATACMNS-1108 - Add repository configuration infrastructure.
Add config infrastructure for ReactiveQueryMethodEvaluationContextProvider.

Original Pull Request: #454
2020-07-22 13:45:25 +02:00
Mark Paluch
edcf1a0562 DATACMNS-1108 - Prefer regular methods in ReflectionUtils.findRequiredMethod(…).
findRequiredMethod(…) now prefers regular methods over synthetic/bridge methods. This refinement is required for newer Java versions that create synthetic bridge methods using the interface's return type. For SpEL extension introspection we're looking for the most specific return type that may be declared in the extension.

Original Pull Request: #454
2020-07-22 13:44:19 +02:00
Mark Paluch
1c354f6d4e DATACMNS-1108 - Add support for Reactive SpEL Context retrieval.
We now support reactive EvaluationContext retrieval in conjunction with ReactiveEvaluationContextExtensions. Reactive SpEL Context extensions may access Reactor's Context and provide contextual details during SpEL evaluation.

Original Pull Request: #454
2020-07-22 13:43:28 +02:00
Mark Paluch
8a9033fdd5 DATACMNS-1742 - Updated changelog. 2020-07-22 10:37:57 +02:00
Mark Paluch
18ded821f5 DATACMNS-1741 - Updated changelog. 2020-07-22 10:08:42 +02:00
Mark Paluch
b1ec2a3c03 DATACMNS-1740 - Updated changelog. 2020-07-22 09:44:28 +02:00
Mark Paluch
13c03e9d17 DATACMNS-1772 - Remove SpringDataAnnotationBeanNameGenerator and use BeanNameGenerator directly.
We now invoke BeanNameGenerator directly without additional indirections. Previously, SpringDataAnnotationBeanNameGenerator was calling BeanNameGenerator using null for BeanDefinitionRegistry which caused downstream null dereference.
2020-07-21 14:51:23 +02:00
Mark Paluch
2355e9dcf3 DATACMNS-1771 - Upgrade to Vavr 0.10.3. 2020-07-21 14:37:23 +02:00
Christoph Strobl
d4e94109df DATACMNS-1231 - Introduce dedicated Auditor value object.
Original Pull Request: #458
2020-07-17 11:16:43 +02:00
Mark Paluch
d3af4a79e4 DATACMNS-1231 - Add reactive auditing infrastructure.
We now provide a reactive variant for auditing with ReactiveAuditingHandler and ReactiveIsNewAwareAuditingHandler.

Extracted common auditing functionality into AuditingHandlerSupport which serves as base class for AuditingHandler and ReactiveAuditingHandler.

Original Pull Request: #458
2020-07-17 10:14:10 +02:00
Mark Paluch
0c37484b19 DATACMNS-1768 - Polishing.
Reduce test visibility. Remove forEach detour through stream().
2020-07-14 09:50:40 +02:00
Mark Paluch
ebcea509b8 DATACMNS-1768 - Reuse bean state in InstantiationAwarePropertyAccessor when setting multiple properties.
We now reuse the new bean in InstantiationAwarePropertyAccessor when setting properties. Previously, we used the initial bean state as the bean was held by a delegate PersistentPropertyAccessor which caused only the last set property to be visible.
2020-07-14 09:50:40 +02:00
Oliver Drotbohm
f6630a5dd5 DATACMNS-1663 - Polishing.
A few refactorings for more readable code in the publishing method interceptor. Tweaks to the reference documentation to include the CrudRepository methods that now also publish the events.

Original pull request: #436.
2020-07-13 18:05:01 +02:00