Index: core-module/pom.xml =================================================================== diff -u -r783816d02f92bdc1fe22640d404db0acd5019aa9 -r9770cc9f85aab4e962101b7044a31e8a749780ab --- core-module/pom.xml (.../pom.xml) (revision 783816d02f92bdc1fe22640d404db0acd5019aa9) +++ core-module/pom.xml (.../pom.xml) (revision 9770cc9f85aab4e962101b7044a31e8a749780ab) @@ -7,7 +7,7 @@ 313devgrp java-service-tree-framework-core-library - 22.12.14 + 22.12.15 ../pom.xml @@ -31,7 +31,7 @@ 313devgrp lib-module - 22.12.14 + 22.12.15 pom Index: core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/RouteTableInterceptor.java =================================================================== diff -u -r783816d02f92bdc1fe22640d404db0acd5019aa9 -r9770cc9f85aab4e962101b7044a31e8a749780ab --- core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/RouteTableInterceptor.java (.../RouteTableInterceptor.java) (revision 783816d02f92bdc1fe22640d404db0acd5019aa9) +++ core-module/src/main/java/egovframework/com/ext/jstree/springHibernate/core/interceptor/RouteTableInterceptor.java (.../RouteTableInterceptor.java) (revision 9770cc9f85aab4e962101b7044a31e8a749780ab) @@ -14,33 +14,60 @@ @Override public String onPrepareStatement(String sql) { + String prepedStatement = super.onPrepareStatement(sql); + try { HttpServletRequest httpServletRequest = SessionUtil.getUrl(); String servletPath = httpServletRequest.getServletPath(); - logger.info("RouteTableInterceptor :: servletPath -> " + servletPath); - } catch (Exception e) { - e.printStackTrace(); - } - 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("T_ARMS_REQADD", replaceTableName); - logger.info("CustomInterceptor :: prepedStatement - after =>" + prepedStatement); - } - return prepedStatement; + ///auth-user/api/arms/reqAdd/T_ARMS_REQADD_145/getChildNode.do + if(StringUtils.contains(servletPath,"T_ARMS_REQADD_")){ + if(StringUtils.contains(servletPath,"getMonitor.do")){ + String replaceTableName = (String) SessionUtil.getAttribute("getMonitor"); + return replaceStatement(prepedStatement, replaceTableName); + } + if(StringUtils.contains(servletPath,"getNode.do")){ + String replaceTableName = (String) SessionUtil.getAttribute("getNode"); + return replaceStatement(prepedStatement, replaceTableName); + } + if(StringUtils.contains(servletPath,"getChildNode.do")){ + String replaceTableName = (String) SessionUtil.getAttribute("getChildNode"); + return replaceStatement(prepedStatement, replaceTableName); + } + if(StringUtils.contains(servletPath,"getChildNodeWithParent.do")){ + String replaceTableName = (String) SessionUtil.getAttribute("getChildNodeWithParent"); + return replaceStatement(prepedStatement, replaceTableName); + } + if(StringUtils.contains(servletPath,"addNode.do")){ + String replaceTableName = (String) SessionUtil.getAttribute("addNode"); + return replaceStatement(prepedStatement, replaceTableName); + } + if(StringUtils.contains(servletPath,"updateNode.do")){ + String replaceTableName = (String) SessionUtil.getAttribute("updateNode"); + return replaceStatement(prepedStatement, replaceTableName); + } + if(StringUtils.contains(servletPath,"moveNode.do")){ + String replaceTableName = (String) SessionUtil.getAttribute("moveNode"); + return replaceStatement(prepedStatement, replaceTableName); + } } + logger.info("RouteTableInterceptor :: servletPath -> " + servletPath); } catch (Exception e) { e.printStackTrace(); } + return prepedStatement; } + + private String replaceStatement(String prepedStatement, String replaceTableName) { + logger.info("RouteTableInterceptor :: prepedStatement - before =>" + prepedStatement); + logger.info("RouteTableInterceptor :: replaceTableName =>" + replaceTableName); + if (StringUtils.isNotEmpty(replaceTableName)) { + prepedStatement = prepedStatement.replaceAll("T_ARMS_REQADD", replaceTableName); + logger.info("RouteTableInterceptor :: prepedStatement - after =>" + prepedStatement); + } + return prepedStatement; + } } \ No newline at end of file Index: lib-module/pom.xml =================================================================== diff -u -r783816d02f92bdc1fe22640d404db0acd5019aa9 -r9770cc9f85aab4e962101b7044a31e8a749780ab --- lib-module/pom.xml (.../pom.xml) (revision 783816d02f92bdc1fe22640d404db0acd5019aa9) +++ lib-module/pom.xml (.../pom.xml) (revision 9770cc9f85aab4e962101b7044a31e8a749780ab) @@ -5,7 +5,7 @@ 313devgrp java-service-tree-framework-core-library - 22.12.14 + 22.12.15 ../pom.xml Index: pom.xml =================================================================== diff -u -r783816d02f92bdc1fe22640d404db0acd5019aa9 -r9770cc9f85aab4e962101b7044a31e8a749780ab --- pom.xml (.../pom.xml) (revision 783816d02f92bdc1fe22640d404db0acd5019aa9) +++ pom.xml (.../pom.xml) (revision 9770cc9f85aab4e962101b7044a31e8a749780ab) @@ -10,7 +10,7 @@ 4.0.0 313devgrp java-service-tree-framework-core-library - 22.12.14 + 22.12.15 pom java-service-tree-framework-core-library