From 816df6ec0a43ef777e0d4cd0daff61f870626d83 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期四, 05 六月 2025 13:53:12 +0800
Subject: [PATCH] feat(system): 添加节假日管理功能- 新增 SysHolidayController、SysHoliday、SysHolidayMapper、SysHolidayServiceImpl 和 ISysHolidayService 类- 实现节假日信息的增删改查和导出功能 - 添加工作日判断方法 - 新增相关 API 接口

---
 zhitan-common/src/main/java/com/zhitan/common/utils/spring/SpringUtils.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/zhitan-common/src/main/java/com/zhitan/common/utils/spring/SpringUtils.java b/zhitan-common/src/main/java/com/zhitan/common/utils/spring/SpringUtils.java
index 011f413..4d60e3b 100644
--- a/zhitan-common/src/main/java/com/zhitan/common/utils/spring/SpringUtils.java
+++ b/zhitan-common/src/main/java/com/zhitan/common/utils/spring/SpringUtils.java
@@ -1,12 +1,15 @@
 package com.zhitan.common.utils.spring;
 
+import cn.hutool.extra.spring.SpringUtil;
 import org.springframework.aop.framework.AopContext;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
 import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
+import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
 import com.zhitan.common.utils.StringUtils;
 
@@ -16,7 +19,7 @@
  * @author zhitan
  */
 @Component
-public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware 
+public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware
 {
     /** Spring搴旂敤涓婁笅鏂囩幆澧� */
     private static ConfigurableListableBeanFactory beanFactory;
@@ -47,6 +50,11 @@
     public static <T> T getBean(String name) throws BeansException
     {
         return (T) beanFactory.getBean(name);
+    }
+
+    public static String getProperty(String key)
+    {
+        return applicationContext == null ? null : applicationContext.getEnvironment().getProperty(key);
     }
 
     /**
@@ -155,4 +163,6 @@
     {
         return applicationContext.getEnvironment().getRequiredProperty(key);
     }
+
+
 }

--
Gitblit v1.9.3