From aa942f402b2ae35cf1df0b057c690417bf18b0a7 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Tue, 25 Oct 2022 19:15:21 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20ehcache3=20set=20=20=20=20=20=20=20code?= =?UTF-8?q?=20/=20=20combo=20code=20caching=20=20=20=20=20=20=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90=EB=B3=84=20menu=20/=20=EA=B6=8C=ED=95=9C?= =?UTF-8?q?=EB=B3=84=20menu=20caching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 39 ++++++++ .../kr/xit/fims/biz/cmm/FimsCmmnUtil.java | 7 -- .../xit/fims/biz/cmm/FimsMapperStrategy.java | 10 +- .../xit/fims/biz/cmm/FimsServiceStrategy.java | 10 +- .../xit/fims/biz/rt/web/Rt0200Controller.java | 3 +- .../xit/framework/biz/cmm/CacheCodeUtils.java | 32 +++++++ .../xit/framework/biz/cmm/CacheMenuUtils.java | 33 +++++++ .../biz/cmm/mapper/CacheCodeMapper.java | 11 +++ .../biz/cmm/mapper/CacheMenuMapper.java | 12 +++ .../biz/cmm/service/CacheService.java | 54 +++++++++++ .../cmm/service/impl/CacheServiceImpl.java | 72 ++++++++++++++ .../service/impl/XitFrameUnitServiceImpl.java | 19 +--- .../biz/cmm/web/CacheController.java | 58 +++++++++++ .../interceptor/XitMenuListIntercepter.java | 5 +- .../support/cache/EhCacheEventLogger.java | 14 +++ .../framework/support/util/JBeanRegistry.java | 11 ++- src/main/resources/spring/context-service.xml | 1 + .../spring/service/cache/context-ehcache.xml | 14 +++ .../spring/service/cache/ehcache.xml | 91 ++++++++++++++++++ .../spring/service/context-security.xml | 1 + .../biz/cmm/cachecode-mysql-mapper.xml | 31 ++++++ .../biz/cmm/cachemenu-mysql-mapper.xml | 95 +++++++++++++++++++ .../WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp | 21 ++-- 23 files changed, 593 insertions(+), 51 deletions(-) delete mode 100644 src/main/java/kr/xit/fims/biz/cmm/FimsCmmnUtil.java create mode 100644 src/main/java/kr/xit/framework/biz/cmm/CacheCodeUtils.java create mode 100644 src/main/java/kr/xit/framework/biz/cmm/CacheMenuUtils.java create mode 100644 src/main/java/kr/xit/framework/biz/cmm/mapper/CacheCodeMapper.java create mode 100644 src/main/java/kr/xit/framework/biz/cmm/mapper/CacheMenuMapper.java create mode 100644 src/main/java/kr/xit/framework/biz/cmm/service/CacheService.java create mode 100644 src/main/java/kr/xit/framework/biz/cmm/service/impl/CacheServiceImpl.java create mode 100644 src/main/java/kr/xit/framework/biz/cmm/web/CacheController.java create mode 100644 src/main/java/kr/xit/framework/support/cache/EhCacheEventLogger.java create mode 100644 src/main/resources/spring/service/cache/context-ehcache.xml create mode 100644 src/main/resources/spring/service/cache/ehcache.xml create mode 100644 src/main/resources/sqlmapper/biz/cmm/cachecode-mysql-mapper.xml create mode 100644 src/main/resources/sqlmapper/biz/cmm/cachemenu-mysql-mapper.xml diff --git a/pom.xml b/pom.xml index a6093434..a1bb1626 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ 3.0.5 + 2.6.11 1.1.3 1.7.25 2.13.4 @@ -493,6 +494,44 @@ + + + + + org.ehcache + ehcache + 3.10.2 + + + commons-logging + commons-logging + + + + + javax.cache + cache-api + 1.1.0 + + + diff --git a/src/main/java/kr/xit/fims/biz/cmm/FimsCmmnUtil.java b/src/main/java/kr/xit/fims/biz/cmm/FimsCmmnUtil.java deleted file mode 100644 index b5304bef..00000000 --- a/src/main/java/kr/xit/fims/biz/cmm/FimsCmmnUtil.java +++ /dev/null @@ -1,7 +0,0 @@ -package kr.xit.fims.biz.cmm; - -import kr.xit.framework.core.utils.XitCmmnUtil; - -public class FimsCmmnUtil extends XitCmmnUtil{ - -} diff --git a/src/main/java/kr/xit/fims/biz/cmm/FimsMapperStrategy.java b/src/main/java/kr/xit/fims/biz/cmm/FimsMapperStrategy.java index a5f642ab..9931207d 100644 --- a/src/main/java/kr/xit/fims/biz/cmm/FimsMapperStrategy.java +++ b/src/main/java/kr/xit/fims/biz/cmm/FimsMapperStrategy.java @@ -15,7 +15,7 @@ public interface FimsMapperStrategy { * @author: 최정민 * @date: 2022. 9. 14. */ - public List findList(P param, RowBounds rowBounds); + List findList(P param, RowBounds rowBounds); /** *
메소드 설명: 단건 조회
@@ -25,7 +25,7 @@ public interface FimsMapperStrategy { * @author: 최정민 * @date: 2022. 9. 14. */ - public T findView(T vo); + T findView(T vo); /** *
메소드 설명: 등록
@@ -33,7 +33,7 @@ public interface FimsMapperStrategy { * @author: 최정민 * @date: 2022. 9. 14. */ - public void addProc(T vo); + void addProc(T vo); /** *
메소드 설명: 수정
@@ -41,7 +41,7 @@ public interface FimsMapperStrategy { * @author: 최정민 * @date: 2022. 9. 14. */ - public void modifyProc(T vo); + void modifyProc(T vo); /** *
메소드 설명: 삭제
@@ -49,5 +49,5 @@ public interface FimsMapperStrategy { * @author: 최정민 * @date: 2022. 9. 14. */ - public void removeProc(T vo); + void removeProc(T vo); } diff --git a/src/main/java/kr/xit/fims/biz/cmm/FimsServiceStrategy.java b/src/main/java/kr/xit/fims/biz/cmm/FimsServiceStrategy.java index 9edaa3c1..cabf2aeb 100644 --- a/src/main/java/kr/xit/fims/biz/cmm/FimsServiceStrategy.java +++ b/src/main/java/kr/xit/fims/biz/cmm/FimsServiceStrategy.java @@ -7,13 +7,13 @@ import org.apache.ibatis.session.RowBounds; public interface FimsServiceStrategy { - public List findList(P searchVO, RowBounds rowBounds) throws SQLException; + List findList(P searchVO, RowBounds rowBounds) throws SQLException; - public T findView(T vo); + T findView(T vo); - public void addProc(T vo); + void addProc(T vo); - public void modifyProc(T vo); + void modifyProc(T vo); - public void removeProc(T vo); + void removeProc(T vo); } diff --git a/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java b/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java index c32d03de..1dc6feab 100644 --- a/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java +++ b/src/main/java/kr/xit/fims/biz/rt/web/Rt0200Controller.java @@ -2,6 +2,7 @@ package kr.xit.fims.biz.rt.web; import kr.xit.fims.biz.rt.model.Rt0200SearchVO; import kr.xit.fims.biz.rt.service.Rt0200Service; +import kr.xit.framework.biz.cmm.CacheCodeUtils; import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.validation.XitBeanValidator; @@ -56,7 +57,7 @@ public class Rt0200Controller { @GetMapping(value = "/rt0200Sel") public ModelAndView rt0200Sel(HttpServletRequest req, Model model){ ModelAndView mav = new ModelAndView(); - mav.addObject("searchCodeList", rt0200Service.findSndngProcessSttus()); + mav.addObject("searchCodeList", CacheCodeUtils.getComboCodes("ENS003")); return mav; } diff --git a/src/main/java/kr/xit/framework/biz/cmm/CacheCodeUtils.java b/src/main/java/kr/xit/framework/biz/cmm/CacheCodeUtils.java new file mode 100644 index 00000000..225a9dbd --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cmm/CacheCodeUtils.java @@ -0,0 +1,32 @@ +package kr.xit.framework.biz.cmm; + +import java.util.List; +import java.util.Map; + +import kr.xit.framework.support.util.JBeanRegistry; + +/** + * 코드 caching + */ +public class CacheCodeUtils { + + /** + * 코드그룹ID(codeGrouId)에 해당하는 코드 Map 리스트를 반환한다. + * + * @param codeId 코드그룹ID + * @return 코드그룹ID(codeGrouId)에 해당하는 코드 Map 리스트 + */ + public static List> getCodes(final String codeId) { + return JBeanRegistry.getCacheService().findCodes(codeId); + } + + /** + * combobox로 전달할 목록을 담은 Map 리스트를 반환한다. + * @param codeId query의 binding data를 담은 Map + * @return combobox로 전달할 목록을 담은 Map 리스트 + */ + public static List> getComboCodes(final String codeId) { + return JBeanRegistry.getCacheService().findComboCodes(codeId); + } + +} diff --git a/src/main/java/kr/xit/framework/biz/cmm/CacheMenuUtils.java b/src/main/java/kr/xit/framework/biz/cmm/CacheMenuUtils.java new file mode 100644 index 00000000..8e56922d --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cmm/CacheMenuUtils.java @@ -0,0 +1,33 @@ +package kr.xit.framework.biz.cmm; + +import java.util.List; +import java.util.Map; + +import kr.xit.framework.support.util.JBeanRegistry; + +/** + * 메뉴 caching + * + */ +public class CacheMenuUtils { + + /** + * + * + * @param uniqId String + * @return List> + */ + public static List> findMenuListByUser(final String uniqId) { + return JBeanRegistry.getCacheService().findMenuListByUser(uniqId); + } + + /** + * + * @param authorCode String + * @return List> + */ + public static List> findMenuListByAuthorCode(final String authorCode) { + return JBeanRegistry.getCacheService().findMenuListByAuthorCode(authorCode); + } + +} diff --git a/src/main/java/kr/xit/framework/biz/cmm/mapper/CacheCodeMapper.java b/src/main/java/kr/xit/framework/biz/cmm/mapper/CacheCodeMapper.java new file mode 100644 index 00000000..385fef1f --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cmm/mapper/CacheCodeMapper.java @@ -0,0 +1,11 @@ +package kr.xit.framework.biz.cmm.mapper; + +import java.util.List; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper +public interface CacheCodeMapper { + List selectCodes(final String codeId); + List selectComboCodes(final String codeId); +} diff --git a/src/main/java/kr/xit/framework/biz/cmm/mapper/CacheMenuMapper.java b/src/main/java/kr/xit/framework/biz/cmm/mapper/CacheMenuMapper.java new file mode 100644 index 00000000..973d05df --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cmm/mapper/CacheMenuMapper.java @@ -0,0 +1,12 @@ +package kr.xit.framework.biz.cmm.mapper; + +import java.util.List; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper +public interface CacheMenuMapper { + List selectMenuListByUser(final String uniqId); + + List selectMenuListByAuthorCode(final String authorCode); +} diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/CacheService.java b/src/main/java/kr/xit/framework/biz/cmm/service/CacheService.java new file mode 100644 index 00000000..8a554980 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cmm/service/CacheService.java @@ -0,0 +1,54 @@ +package kr.xit.framework.biz.cmm.service; + +import java.util.List; +import java.util.Map; + +public interface CacheService { + + /** + * 코드 그룹 아이디로 모든 코드 목록을 Map 타입으로 조회한다. + * @param codeId + * @return List + */ + List> findCodes(final String codeId); + + /** + * 코드 그룹 아이디로 모든 코드 목록을 Map 타입으로 조회한다. + * @param codeId + * @return List + */ + List> findComboCodes(final String codeId); + + /** + * 사용자별 메뉴 조회 + * @param uniqId + * @return List + */ + List> findMenuListByUser(final String uniqId); + /** + * 궘한별 메뉴 조회 + * @param authorCode + * @return List + */ + List> findMenuListByAuthorCode(final String authorCode); + + /** + * 코드 캐시 Evict + */ + void evictAllCodeCache(); + + /** + * 메뉴 캐시 Evict + */ + void evictAllMenuCache(); + + /** + * 코드 캐시 Evict + */ + void evictCodeCache(final String codeId); + + /** + * 메뉴 캐시 Evict + */ + void evictMenuCache(final String userId); +} diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/impl/CacheServiceImpl.java b/src/main/java/kr/xit/framework/biz/cmm/service/impl/CacheServiceImpl.java new file mode 100644 index 00000000..dae18c58 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cmm/service/impl/CacheServiceImpl.java @@ -0,0 +1,72 @@ +package kr.xit.framework.biz.cmm.service.impl; + +import java.util.List; +import java.util.Map; + +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +import kr.xit.framework.biz.cmm.service.CacheService; +import kr.xit.framework.biz.cmm.mapper.CacheCodeMapper; +import kr.xit.framework.biz.cmm.mapper.CacheMenuMapper; +import lombok.AllArgsConstructor; + +@AllArgsConstructor +@Service +public class CacheServiceImpl implements CacheService { + + @SuppressWarnings("rawtypes") + private final CacheCodeMapper codeMapper; + + @SuppressWarnings("rawtypes") + private final CacheMenuMapper menuMapper; + + @SuppressWarnings("unchecked") + @Cacheable(cacheNames="codeCache", key = "#codeId") + @Override + public List> findCodes(final String codeId) { + return codeMapper.selectCodes(codeId); + } + + @SuppressWarnings("unchecked") + @Cacheable(cacheNames="codeComboCache", key = "#codeId") + @Override + public List> findComboCodes(final String codeId) { + return codeMapper.selectComboCodes(codeId); + } + + @SuppressWarnings("unchecked") + @Cacheable(cacheNames="menuCache", key = "#uniqId") + @Override + public List> findMenuListByUser(final String uniqId) { + return menuMapper.selectMenuListByUser(uniqId); + } + + @Cacheable(cacheNames="menuCache", key = "#authorCode") + @Override + public List> findMenuListByAuthorCode(final String authorCode) { + return menuMapper.selectMenuListByAuthorCode(authorCode); + } + + @Override + @CacheEvict(cacheNames="codeCache", allEntries = true) + public void evictAllCodeCache() { + } + + @Override + @CacheEvict(cacheNames="menuCache", allEntries = true) + public void evictAllMenuCache() { + } + + @Override + @CacheEvict(cacheNames="codeCache", allEntries = true) + public void evictCodeCache(final String codeId) { + } + + @Override + @CacheEvict(cacheNames="menuCache", allEntries = true) + public void evictMenuCache(final String key) { + } + +} diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java index 58b12994..08160ea4 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java @@ -13,6 +13,7 @@ import org.springframework.stereotype.Service; import egovframework.rte.fdl.cmmn.exception.FdlException; import egovframework.rte.fdl.idgnr.EgovIdGnrService; import egovframework.rte.fdl.security.intercept.EgovReloadableFilterInvocationSecurityMetadataSource; +import kr.xit.framework.biz.cmm.CacheMenuUtils; import lombok.extern.slf4j.Slf4j; import kr.xit.framework.biz.cmm.mapper.XitFrameUnitMapper; import kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO; @@ -291,27 +292,13 @@ public class XitFrameUnitServiceImpl implements XitFrameUnitService { @Override public List> findMenuListByUser(String uniqId) { - List> result = null; - try { - result = xitFrameUnitMapper.findMenuListByUser(uniqId); - } catch (SQLException e) { - throw new RuntimeException("사용자별 메뉴목록 조회 실패", e); - } - return result; + return CacheMenuUtils.findMenuListByUser(uniqId); } @Override public List> findMenuListByAuthorCode(String authorCode){ - List> result = null; - try { - result = xitFrameUnitMapper.findMenuListByAuthorCode(authorCode); - } catch (SQLException e) { - throw new RuntimeException("권한별 메뉴목록 조회 실패", e); - } - return result; - + return CacheMenuUtils.findMenuListByAuthorCode(authorCode); } - @Override public int findUserIdDuplCheck(String id) { diff --git a/src/main/java/kr/xit/framework/biz/cmm/web/CacheController.java b/src/main/java/kr/xit/framework/biz/cmm/web/CacheController.java new file mode 100644 index 00000000..10e2b409 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/cmm/web/CacheController.java @@ -0,0 +1,58 @@ +package kr.xit.framework.biz.cmm.web; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +import kr.xit.framework.biz.cmm.CacheCodeUtils; +import kr.xit.framework.biz.cmm.CacheMenuUtils; +import kr.xit.framework.core.constants.FrameworkConstants; + +/** + * 공통코드, 사용자코드 콘트롤러 + * + */ +@Controller +@RequestMapping(value="/framework/biz/cmm/cache") +public class +CacheController { + + /** + * 코드 목록조회 + * @param codeId String + * @return ModelAndView + */ + @GetMapping(value="/getCodeList") + public ModelAndView getCodeList(final String codeId) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + mav.addObject(codeId, CacheCodeUtils.getCodes(codeId)); + return mav; + } + + /** + * Combo 코드 목록조회 + * @param codeId String + * @return ModelAndView + */ + @GetMapping(value="/getComboCodeList") + public ModelAndView getComboCodeList(final String codeId) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + mav.addObject(codeId, CacheCodeUtils.getComboCodes(codeId)); + return mav; + } + + @GetMapping(value="/getMenuListByUser") + public ModelAndView getMenuListByUser(final String uniqId) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + mav.addObject("allMenuList", CacheMenuUtils.findMenuListByUser(uniqId)); + return mav; + } + + @GetMapping(value="/getMenuListByAuthorCode") + public ModelAndView getMenuListByAuthorCode(final String authorCode) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + mav.addObject("allMenuList", CacheMenuUtils.findMenuListByAuthorCode(authorCode)); + return mav; + } +} diff --git a/src/main/java/kr/xit/framework/core/interceptor/XitMenuListIntercepter.java b/src/main/java/kr/xit/framework/core/interceptor/XitMenuListIntercepter.java index a71c3449..18ad424d 100644 --- a/src/main/java/kr/xit/framework/core/interceptor/XitMenuListIntercepter.java +++ b/src/main/java/kr/xit/framework/core/interceptor/XitMenuListIntercepter.java @@ -14,6 +14,7 @@ import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import com.fasterxml.jackson.databind.JsonMappingException; import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; +import kr.xit.framework.biz.cmm.CacheMenuUtils; import kr.xit.framework.core.model.XitRollingNotiVO; import kr.xit.framework.support.exception.JSONExceptionMessageWriter; import kr.xit.framework.support.util.Checks; @@ -83,12 +84,12 @@ public class XitMenuListIntercepter extends HandlerInterceptorAdapter { XitLoginVO loginVO = (XitLoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); //사용자별 메뉴 목록 조회 - allMenuList = xitFrameUnitService.findMenuListByUser(loginVO.getUniqId()); + allMenuList = CacheMenuUtils.findMenuListByUser(loginVO.getUniqId()); } else { //익명사용자 메뉴 목록 조회 - allMenuList = xitFrameUnitService.findMenuListByAuthorCode("ROLE_ANONYMOUS"); + allMenuList = CacheMenuUtils.findMenuListByAuthorCode("ROLE_ANONYMOUS"); } diff --git a/src/main/java/kr/xit/framework/support/cache/EhCacheEventLogger.java b/src/main/java/kr/xit/framework/support/cache/EhCacheEventLogger.java new file mode 100644 index 00000000..f034d9a6 --- /dev/null +++ b/src/main/java/kr/xit/framework/support/cache/EhCacheEventLogger.java @@ -0,0 +1,14 @@ +package kr.xit.framework.support.cache; + +import org.ehcache.event.CacheEvent; +import org.ehcache.event.CacheEventListener; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class EhCacheEventLogger implements CacheEventListener { + @Override + public void onEvent(CacheEvent cacheEvent) { + log.info("cache event logger message::getKey: {} / getOldValue: {} / getNewValue:{}", cacheEvent.getKey(), cacheEvent.getOldValue(), cacheEvent.getNewValue()); + } +} diff --git a/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java b/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java index c90004ed..411e24d2 100644 --- a/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java +++ b/src/main/java/kr/xit/framework/support/util/JBeanRegistry.java @@ -3,6 +3,7 @@ package kr.xit.framework.support.util; import org.springframework.context.MessageSource; import org.springframework.context.support.MessageSourceAccessor; +import kr.xit.framework.biz.cmm.service.CacheService; import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.validation.XitBeanValidator; @@ -12,7 +13,7 @@ import kr.xit.framework.core.validation.XitBeanValidator; */ public class JBeanRegistry { - public static final XitBeanValidator getValidator() { + public static XitBeanValidator getValidator() { return (XitBeanValidator)SpringUtils.getBean(XitBeanValidator.class); } @@ -20,11 +21,15 @@ public class JBeanRegistry { * 메시지소스 객체를 반환한다. * @return MessageSourceAccessor */ - public static final MessageSourceAccessor getMessageSourceAccessor() { + public static MessageSourceAccessor getMessageSourceAccessor() { return (MessageSourceAccessor)SpringUtils.getBean(MessageSourceAccessor.class); } - public static final MessageSource getMessageSource() { + public static MessageSource getMessageSource() { return (MessageSource)SpringUtils.getBean(XitMessageSource.class); } + + public static CacheService getCacheService() { + return (CacheService)SpringUtils.getBean(CacheService.class); + } } diff --git a/src/main/resources/spring/context-service.xml b/src/main/resources/spring/context-service.xml index 2ded230e..8ef7f020 100644 --- a/src/main/resources/spring/context-service.xml +++ b/src/main/resources/spring/context-service.xml @@ -8,6 +8,7 @@ + diff --git a/src/main/resources/spring/service/cache/context-ehcache.xml b/src/main/resources/spring/service/cache/context-ehcache.xml new file mode 100644 index 00000000..a421303a --- /dev/null +++ b/src/main/resources/spring/service/cache/context-ehcache.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/main/resources/spring/service/cache/ehcache.xml b/src/main/resources/spring/service/cache/ehcache.xml new file mode 100644 index 00000000..271c82e6 --- /dev/null +++ b/src/main/resources/spring/service/cache/ehcache.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + kr.xit.framework.support.cache.EhCacheEventLogger + ASYNCHRONOUS + UNORDERED + CREATED + EVICTED + REMOVED + UPDATED + EXPIRED + + + + + + java.lang.Object + java.lang.Object + + + + 5 + + + + + + + + + 100 + + 10 + + 50 + + + + + java.lang.Object + java.lang.Object + + + + 5 + + + + + + + + + 100 + + 10 + + 50 + + + + + java.lang.Object + java.lang.Object + + + + 5 + + + + + + + + + 100 + + 10 + + 50 + + + diff --git a/src/main/resources/spring/service/context-security.xml b/src/main/resources/spring/service/context-security.xml index 6d911426..80f87514 100644 --- a/src/main/resources/spring/service/context-security.xml +++ b/src/main/resources/spring/service/context-security.xml @@ -17,6 +17,7 @@ + diff --git a/src/main/resources/sqlmapper/biz/cmm/cachecode-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/cmm/cachecode-mysql-mapper.xml new file mode 100644 index 00000000..4b7c216b --- /dev/null +++ b/src/main/resources/sqlmapper/biz/cmm/cachecode-mysql-mapper.xml @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/src/main/resources/sqlmapper/biz/cmm/cachemenu-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/cmm/cachemenu-mysql-mapper.xml new file mode 100644 index 00000000..f423f7c7 --- /dev/null +++ b/src/main/resources/sqlmapper/biz/cmm/cachemenu-mysql-mapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + WITH RECURSIVE tree_query( + menu_id + , PARNT_menu_id + , menu_name + , menu_full_path + , menu_full_path_name + , menu_depth + ) AS ( + SELECT A.menu_no AS "menu_id" + , A.upper_menu_no AS "parnt_menu_id" + , A.menu_nm AS "menu_name" + , CONCAT('', A.menu_no) AS "menu_full_path" + , CONCAT('', A.menu_nm) AS "menu_full_path_name" + , 1 AS "menu_depth" + FROM xit_menu_info A + INNER JOIN xit_progrm_list B + ON A.progrm_file_nm = B.progrm_file_nm + WHERE A.UPPER_MENU_NO = 0 + UNION ALL + SELECT A.menu_no AS "menu_id" + , A.upper_menu_no AS "parnt_menu_id" + , A.menu_nm AS "menu_name" + , CONCAT(B.menu_full_path, '_', A.menu_no) AS "menu_full_path" + , CONCAT(B.menu_full_path_name, ' > ', A.menu_nm) AS "menu_full_path_name" + , B.menu_depth + 1 AS "menu_depth" + FROM xit_menu_info A + INNER JOIN tree_query B + ON A.upper_menu_no = B.menu_id + WHERE B.menu_id != 0 + ) + + + diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp index 544655bb..b88999a0 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp @@ -132,18 +132,6 @@ const ARR_TOTCNT = [0,0,0]; let CUR_TAB_SEQ = 0; - $(document).ready(function() { - - Rt0200_main.init(); - - $('#totCnt span').text(ARR_TOTCNT[CUR_TAB_SEQ]); - $("#tabs").tabs({active : CUR_TAB_SEQ}); - //ARR_INSTANCE[0].refreshLayout(); - }); - - - - /* ******************************* * 사용자 등록관리 Functions ******************************* */ @@ -452,4 +440,13 @@ } + $(document).ready(function() { + + Rt0200_main.init(); + + $('#totCnt span').text(ARR_TOTCNT[CUR_TAB_SEQ]); + $("#tabs").tabs({active : CUR_TAB_SEQ}); + //ARR_INSTANCE[0].refreshLayout(); + }); +