From b6b41e1eca22f54253187915c1c6c5d4adead482 Mon Sep 17 00:00:00 2001 From: DouDou <877258667@qq.com> Date: Wed, 10 Sep 2025 11:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=20=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/spring/config/LdapAccountInitLoad.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/spring/config/LdapAccountInitLoad.java b/src/main/java/com/spring/config/LdapAccountInitLoad.java index ffaf14a7..5e76bb8d 100644 --- a/src/main/java/com/spring/config/LdapAccountInitLoad.java +++ b/src/main/java/com/spring/config/LdapAccountInitLoad.java @@ -75,7 +75,9 @@ public class LdapAccountInitLoad implements ApplicationRunner{ } catch (NamingException e) { logger.error("Failed to connect to the LDAP server."); } finally{ - ctx.close(); + if (null != ctx){ + ctx.close(); + } } }