From 828641ce9d4178bbff9030ad19ce93d0267f185c Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 17 九月 2025 08:36:42 +0800
Subject: [PATCH] no message
---
zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/SpringUtils.java | 76 +++++++++++++++++++-------------------
1 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/SpringUtils.java b/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/SpringUtils.java
index 3bb38b8..88ae61e 100644
--- a/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/SpringUtils.java
+++ b/zy-asrs-framework/src/main/java/com/zy/asrs/framework/common/SpringUtils.java
@@ -1,38 +1,38 @@
-package com.zy.asrs.framework.common;
-
-import com.zy.asrs.framework.exception.CoolException;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-
-public class SpringUtils implements ApplicationContextAware {
-
- private static ApplicationContext application;
-
- public SpringUtils() {}
-
- public static void init(ApplicationContext context) {
- SpringUtils.application = context;
- }
-
- @Override
- public void setApplicationContext(ApplicationContext context) throws BeansException {
- SpringUtils.application = context;
- }
-
- public static ApplicationContext getApplicationContext() {
- if(application==null) {
- throw new CoolException(BaseRes.ERROR);
- }
- return application;
- }
-
- public static <T>T getBean(Class<T> prototype) {
- return getApplicationContext().getBean(prototype);
- }
-
- public static Object getBean(String name) {
- return getApplicationContext().getBean(name);
- }
-
-}
+package com.zy.asrs.framework.common;
+
+import com.zy.asrs.framework.exception.CoolException;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+public class SpringUtils implements ApplicationContextAware {
+
+ private static ApplicationContext application;
+
+ public SpringUtils() {}
+
+ public static void init(ApplicationContext context) {
+ SpringUtils.application = context;
+ }
+
+ @Override
+ public void setApplicationContext(ApplicationContext context) throws BeansException {
+ SpringUtils.application = context;
+ }
+
+ public static ApplicationContext getApplicationContext() {
+ if(application==null) {
+ throw new CoolException(BaseRes.ERROR);
+ }
+ return application;
+ }
+
+ public static <T>T getBean(Class<T> prototype) {
+ return getApplicationContext().getBean(prototype);
+ }
+
+ public static Object getBean(String name) {
+ return getApplicationContext().getBean(name);
+ }
+
+}
--
Gitblit v1.9.1