Move ReactiveWrappers into o.s.d.util package.

ReactiveWrappers is not tied to repositories so it does not need to reside in the repository.util package. This utility is now located in the data.util package for a better module design and to prevent package cycles.

See #2708
This commit is contained in:
Mark Paluch
2022-11-02 10:50:03 +01:00
parent 5b784d006f
commit 6190baa3db
12 changed files with 285 additions and 107 deletions

View File

@@ -25,6 +25,7 @@ import org.springframework.beans.factory.support.RegisteredBean;
import org.springframework.core.DecoratingProxy;
import org.springframework.data.domain.AuditorAware;
import org.springframework.data.domain.ReactiveAuditorAware;
import org.springframework.data.util.ReactiveWrappers;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
@@ -38,8 +39,6 @@ import org.springframework.util.ClassUtils;
*/
class AuditingBeanRegistrationAotProcessor implements BeanRegistrationAotProcessor {
private static final boolean PROJECT_REACTOR_PRESENT = ClassUtils.isPresent("reactor.core.publisher.Flux",
AuditingBeanRegistrationAotProcessor.class.getClassLoader());
@Nullable
@Override
@@ -50,7 +49,7 @@ class AuditingBeanRegistrationAotProcessor implements BeanRegistrationAotProcess
generationContext.getRuntimeHints());
}
if (PROJECT_REACTOR_PRESENT && isReactiveAuditorAware(registeredBean)) {
if (ReactiveWrappers.PROJECT_REACTOR_PRESENT && isReactiveAuditorAware(registeredBean)) {
return (generationContext, beanRegistrationCode) -> registerSpringProxy(ReactiveAuditorAware.class,
generationContext.getRuntimeHints());
}