From 1cea0834efcb052ea7f73fa0a8b0f921aa860509 Mon Sep 17 00:00:00 2001 From: Luke0125 <94302726+BlackBear2003@users.noreply.github.com> Date: Thu, 21 Dec 2023 20:37:11 +0800 Subject: [PATCH] Fix circular references on LdapAutoConfiguration (#5055) * Update ApolloAuditSpanAspectTest.java * update changes.md --- CHANGES.md | 1 + .../apollo/portal/spi/configuration/AuthConfiguration.java | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e1f9fc846ac..ec4d138378b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ Release Notes. Apollo 2.3.0 ------------------ +* [Fix circular references on LdapAutoConfiguration](https://github.com/apolloconfig/apollo/pull/5055) ------------------ diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthConfiguration.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthConfiguration.java index d7bfcd078fb..5d9d60fa53b 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthConfiguration.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthConfiguration.java @@ -195,14 +195,11 @@ static class SpringSecurityLDAPAuthAutoConfiguration { private final LdapProperties properties; private final Environment environment; - private final LdapTemplate ldapTemplate; public SpringSecurityLDAPAuthAutoConfiguration(final LdapProperties properties, - final Environment environment, - final LdapTemplate ldapTemplate) { + final Environment environment) { this.properties = properties; this.environment = environment; - this.ldapTemplate = ldapTemplate; } @Bean @@ -225,7 +222,7 @@ public LogoutHandler logoutHandler() { @Bean @ConditionalOnMissingBean(UserService.class) - public UserService springSecurityUserService() { + public UserService springSecurityUserService(LdapTemplate ldapTemplate) { return new LdapUserService(ldapTemplate); }