Index: core-module/pom.xml
===================================================================
diff -u -r5ac0b767f66026bfa55bcf9256a3661e5799f508 -rb53210daaf7b2a6e192cff27026c9961937caea2
--- core-module/pom.xml (.../pom.xml) (revision 5ac0b767f66026bfa55bcf9256a3661e5799f508)
+++ core-module/pom.xml (.../pom.xml) (revision b53210daaf7b2a6e192cff27026c9961937caea2)
@@ -7,7 +7,7 @@
313devgrp
java-service-tree-framework-core-library
- 22.11.10
+ 22.11.11
../pom.xml
@@ -31,7 +31,7 @@
313devgrp
lib-module
- 22.11.10
+ 22.11.11
pom
Index: core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/RouteTableInterceptor.java
===================================================================
diff -u
--- core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/RouteTableInterceptor.java (revision 0)
+++ core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/RouteTableInterceptor.java (revision b53210daaf7b2a6e192cff27026c9961937caea2)
@@ -0,0 +1,36 @@
+package egovframework.com.ext.jstree.springHibernate.core.interceptor;
+
+import egovframework.com.ext.jstree.support.util.StringUtils;
+import org.hibernate.EmptyInterceptor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RouteTableInterceptor extends EmptyInterceptor {
+
+ private static final Logger logger = LoggerFactory.getLogger(RouteTableInterceptor.class);
+
+ @Override
+ public String onPrepareStatement(String sql) {
+
+ String prepedStatement = super.onPrepareStatement(sql);
+ try {
+ if (null == SessionUtil.getAttribute("replaceTableName")) {
+ logger.info("Normal JSTF Framework Excute");
+ } else {
+ String replaceTableName = (String) SessionUtil.getAttribute("replaceTableName");
+ logger.info("CustomInterceptor :: prepedStatement - before =>" + prepedStatement);
+ logger.info("CustomInterceptor :: replaceTableName =>" + replaceTableName);
+ if (StringUtils.isNotEmpty(replaceTableName)) {
+ prepedStatement = prepedStatement.replaceAll("from T_ARMS_REQ", "from " + replaceTableName);
+ logger.info("CustomInterceptor :: prepedStatement - after =>" + prepedStatement);
+ }
+ return prepedStatement;
+
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return prepedStatement;
+ }
+}
\ No newline at end of file
Index: core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/SessionUtil.java
===================================================================
diff -u
--- core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/SessionUtil.java (revision 0)
+++ core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/SessionUtil.java (revision b53210daaf7b2a6e192cff27026c9961937caea2)
@@ -0,0 +1,53 @@
+package egovframework.com.ext.jstree.springHibernate.core.interceptor;
+
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+
+/**
+ * session Util
+ * - Spring에서 제공하는 RequestContextHolder 를 이용하여
+ * request 객체를 service까지 전달하지 않고 사용할 수 있게 해줌
+ *
+ */
+public class SessionUtil {
+ /**
+ * attribute 값을 가져 오기 위한 method
+ *
+ * @param String attribute key name
+ * @return Object attribute obj
+ */
+ public static Object getAttribute(String name) throws Exception {
+ return (Object)RequestContextHolder.getRequestAttributes().getAttribute(name, RequestAttributes.SCOPE_SESSION);
+ }
+
+ /**
+ * attribute 설정 method
+ *
+ * @param String attribute key name
+ * @param Object attribute obj
+ * @return void
+ */
+ public static void setAttribute(String name, Object object) throws Exception {
+ RequestContextHolder.getRequestAttributes().setAttribute(name, object, RequestAttributes.SCOPE_SESSION);
+ }
+
+ /**
+ * 설정한 attribute 삭제
+ *
+ * @param String attribute key name
+ * @return void
+ */
+ public static void removeAttribute(String name) throws Exception {
+ RequestContextHolder.getRequestAttributes().removeAttribute(name, RequestAttributes.SCOPE_SESSION);
+ }
+
+ /**
+ * session id
+ *
+ * @param void
+ * @return String SessionId 값
+ */
+ public static String getSessionId() throws Exception {
+ return RequestContextHolder.getRequestAttributes().getSessionId();
+ }
+}
Index: core-module/src/main/resources/egovframework/spring/com/context-hibernate.xml
===================================================================
diff -u -r041815e1b9cc483e411271425a2fa108f8befa2a -rb53210daaf7b2a6e192cff27026c9961937caea2
--- core-module/src/main/resources/egovframework/spring/com/context-hibernate.xml (.../context-hibernate.xml) (revision 041815e1b9cc483e411271425a2fa108f8befa2a)
+++ core-module/src/main/resources/egovframework/spring/com/context-hibernate.xml (.../context-hibernate.xml) (revision b53210daaf7b2a6e192cff27026c9961937caea2)
@@ -27,7 +27,8 @@
true
true
2
-
+
+
org.hibernate.cache.EhCacheProvider
true
true
@@ -43,8 +44,10 @@
+
+
Index: lib-module/pom.xml
===================================================================
diff -u -r5ac0b767f66026bfa55bcf9256a3661e5799f508 -rb53210daaf7b2a6e192cff27026c9961937caea2
--- lib-module/pom.xml (.../pom.xml) (revision 5ac0b767f66026bfa55bcf9256a3661e5799f508)
+++ lib-module/pom.xml (.../pom.xml) (revision b53210daaf7b2a6e192cff27026c9961937caea2)
@@ -5,7 +5,7 @@
313devgrp
java-service-tree-framework-core-library
- 22.11.10
+ 22.11.11
../pom.xml
Index: pom.xml
===================================================================
diff -u -r5ac0b767f66026bfa55bcf9256a3661e5799f508 -rb53210daaf7b2a6e192cff27026c9961937caea2
--- pom.xml (.../pom.xml) (revision 5ac0b767f66026bfa55bcf9256a3661e5799f508)
+++ pom.xml (.../pom.xml) (revision b53210daaf7b2a6e192cff27026c9961937caea2)
@@ -10,7 +10,7 @@
4.0.0
313devgrp
java-service-tree-framework-core-library
- 22.11.10
+ 22.11.11
pom
java-service-tree-framework-core-library