Polishing

This commit is contained in:
Juergen Hoeller 2020-06-08 19:27:38 +02:00
parent edbc54fe78
commit 9c1c787ee9
2 changed files with 5 additions and 3 deletions

View File

@ -310,6 +310,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* <p>This enables convenient customizations for application purposes, e.g. * <p>This enables convenient customizations for application purposes, e.g.
* setting Hibernate filters. * setting Hibernate filters.
* @since 5.3 * @since 5.3
* @see Session#enableFilter
*/ */
public void setSessionInitializer(Consumer<Session> sessionInitializer) { public void setSessionInitializer(Consumer<Session> sessionInitializer) {
this.sessionInitializer = sessionInitializer; this.sessionInitializer = sessionInitializer;
@ -478,7 +479,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
obtainSessionFactory().withOptions().interceptor(entityInterceptor).openSession() : obtainSessionFactory().withOptions().interceptor(entityInterceptor).openSession() :
obtainSessionFactory().openSession()); obtainSessionFactory().openSession());
if (this.sessionInitializer != null) { if (this.sessionInitializer != null) {
this.sessionInitializer.accept(session); this.sessionInitializer.accept(newSession);
} }
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Opened new Session [" + newSession + "] for Hibernate transaction"); logger.debug("Opened new Session [" + newSession + "] for Hibernate transaction");

View File

@ -57,8 +57,9 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
ClassLoader loader = DefaultWebClientBuilder.class.getClassLoader(); ClassLoader loader = DefaultWebClientBuilder.class.getClassLoader();
reactorClientPresent = ClassUtils.isPresent("reactor.netty.http.client.HttpClient", loader); reactorClientPresent = ClassUtils.isPresent("reactor.netty.http.client.HttpClient", loader);
jettyClientPresent = ClassUtils.isPresent("org.eclipse.jetty.client.HttpClient", loader); jettyClientPresent = ClassUtils.isPresent("org.eclipse.jetty.client.HttpClient", loader);
httpComponentsClientPresent = ClassUtils.isPresent("org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient", loader) httpComponentsClientPresent =
&& ClassUtils.isPresent("org.apache.hc.core5.reactive.ReactiveDataConsumer", loader); ClassUtils.isPresent("org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient", loader) &&
ClassUtils.isPresent("org.apache.hc.core5.reactive.ReactiveDataConsumer", loader);
} }