diff --git a/README.md b/README.md index 911aee8a..175b949e 100644 --- a/README.md +++ b/README.md @@ -311,4 +311,4 @@ Rest API-dev: Rest API-prod: 배치: -sneat documentation : \ No newline at end of file +sneat documentation : diff --git a/src/main/java/kr/xit/fims/biz/rt/web/RtCrackdownMgtController.java b/src/main/java/kr/xit/fims/biz/rt/web/RtCrackdownMgtController.java index dc92105d..889d996d 100644 --- a/src/main/java/kr/xit/fims/biz/rt/web/RtCrackdownMgtController.java +++ b/src/main/java/kr/xit/fims/biz/rt/web/RtCrackdownMgtController.java @@ -2,7 +2,6 @@ package kr.xit.fims.biz.rt.web; import java.util.Map; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -37,13 +36,20 @@ import lombok.extern.slf4j.Slf4j; @Slf4j @RequiredArgsConstructor @Controller -@RequestMapping("/fims/biz/rt") +@RequestMapping(RtCrackdownMgtController.PATH) public class RtCrackdownMgtController { + static final String PATH = "/fims/biz/rt"; + private final IRtCrackdownMgtService service; private final ICmmFileService fileService; + @RequestMapping({"/list"}) + public String list() { + return "/list.html"; + } + @RequestMapping(value = "/rtRegltMgtForm") public void rtRegltMgtForm(){ } diff --git a/src/main/java/kr/xit/framework/core/aop/LogAopAdvice.java b/src/main/java/kr/xit/framework/core/aop/LogAopAdvice.java index a7002d94..4350f3cd 100644 --- a/src/main/java/kr/xit/framework/core/aop/LogAopAdvice.java +++ b/src/main/java/kr/xit/framework/core/aop/LogAopAdvice.java @@ -12,6 +12,7 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.ui.Model; @@ -28,46 +29,71 @@ import lombok.extern.slf4j.Slf4j; @Component @Aspect public class LogAopAdvice { + @Value("#{prop['debug.result.log.trace']}") private boolean isRsltLog; - - @Around("execution(public * kr.xit.framework..web.*.*(..))||execution(public * kr.xit.fims..web.*.*(..))") + @Pointcut("execution(public * kr.xit..web.*.*(..))") + public void pointCut() {} + + // @Before("pointCut()") + // public void beforeProcess(JoinPoint joinPoint) { + // MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); + // Method method = methodSignature.getMethod(); + // Object[] objs = joinPoint.getArgs(); + // log.info("Start-{} ", methodSignature.getDeclaringTypeName() + "." + method.getName()); + // log.info("Request Param : {} ", objs); + // } + // + // @AfterReturning(value = "pointCut()", returning = "returnValue") + // public void afterReturning(JoinPoint joinPoint, Object returnValue) { + // MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); + // Method method = methodSignature.getMethod(); + // log.info("End-{} ", methodSignature.getDeclaringTypeName() + "." + method.getName()); + // log.info("Response Param : {} ", returnValue); + // } + + @Around("pointCut()") public Object aroundProceed(ProceedingJoinPoint pjp) throws Throwable { - String methodName = pjp.getSignature().getName(); -// StopWatch sw = new StopWatch(pjp.toShortString());// + //StopWatch sw = new StopWatch();// // sw.start(methodName); - + // Parameter log RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) requestAttributes; HttpServletRequest request = servletRequestAttributes.getRequest(); - requestLog(request); - Object[] args = pjp.getArgs(); + //Object[] args = pjp.getArgs(); + requestLog(request); //TODO 필요시 insert log //logInsert(methodName, request, paraMap+""); - + Object rtnObj = pjp.proceed(); + //sw.stop(); if(isRsltLog) { - log.info("//==============================Result===================================="); - log.info("{}", rtnObj); - log.info("=========================================================================//"); + StringBuilder sb = new StringBuilder(); + sb.append("//==============================Result====================================").append("\n"); + sb.append("Execution : ").append(pjp.getSignature()).append("\n"); + sb.append("return : ").append(rtnObj).append("\n"); + sb.append("=========================================================================//"); + log.debug(sb.toString()); + }else { + // log.info("실행시간 : {}", sw.getTotalTimeSeconds()); } Object pageObject = RequestContextHolder.getRequestAttributes().getAttribute(PagingConstants.Session.PAGE_INFO.getCode(), RequestAttributes.SCOPE_REQUEST); if(pageObject != null && rtnObj != null){ Paginator paginator = (Paginator)pageObject; - -log.debug("###################################{}",rtnObj.getClass()); - + + log.debug("###################################{}",rtnObj.getClass()); + //if(rtnObj instanceof Map){ if(Map.class.isAssignableFrom(rtnObj.getClass())){ Map map = (Map)rtnObj; map.putAll(getPageInfoMap(paginator)); return map; - - //}else if(rtnObj instanceof List){ + + //}else if(rtnObj instanceof List){ }else if(List.class.isAssignableFrom(rtnObj.getClass())){ Map map = new HashMap(); map.put("rows", rtnObj); @@ -93,7 +119,6 @@ log.debug("###################################{}",rtnObj.getClass()); } } - //TODO update Log //update(rtnObj); // sw.stop(); @@ -101,7 +126,7 @@ log.debug("###################################{}",rtnObj.getClass()); return rtnObj; } - + @AfterThrowing(pointcut="execution(public * kr.xit.framework..*.*(..))||execution(public * kr.xit.fims..*.*(..))", throwing="error") public void afterThrowingProceed(JoinPoint jp, Throwable error) { error.printStackTrace(); @@ -111,28 +136,27 @@ log.debug("###################################{}",rtnObj.getClass()); log.error("@@@(THORWS) getMessage: {}", error.getMessage()); log.error("@@@(THORWS) getCause: {}", error.getCause()); } - - private void requestLog(HttpServletRequest request) { - - if (log.isDebugEnabled()) { - String method = request.getMethod(); - StringBuilder sb = new StringBuilder("\n"); - sb.append("//=========================================================================\n"); - //sb.append("Ajax Call : " + "XMLHttpRequest".equals(request.getHeader(Globals.AJAX_HEADER))).append("\n"); - sb.append("URI : " + request.getRequestURI()).append("\n"); - sb.append("URL : " + request.getRequestURL()).append("\n"); - sb.append("IP : " + request.getRemoteAddr()).append("\n"); - sb.append("Referer URI : " + request.getHeader("referer")).append("\n"); - sb.append("Method : " + request.getMethod()).append("\n"); - sb.append("User Agent : " + request.getHeader("User-Agent")).append("\n"); - sb.append("Session : " + request.getSession().getId()).append("\n"); - sb.append("Locale : " + request.getLocale().getCountry()).append("\n"); - sb.append("ContentType : " + request.getContentType()).append("\n"); - + + private void requestLog(HttpServletRequest request) { + + if (log.isDebugEnabled()) { + String method = request.getMethod(); + StringBuilder sb = new StringBuilder("\n"); + sb.append("//=========================================================================\n"); + //sb.append("Ajax Call : " + "XMLHttpRequest".equals(request.getHeader(Globals.AJAX_HEADER))).append("\n"); + sb.append("URI : " + request.getRequestURI()).append("\n"); + sb.append("URL : " + request.getRequestURL()).append("\n"); + sb.append("IP : " + request.getRemoteAddr()).append("\n"); + sb.append("Referer URI : " + request.getHeader("referer")).append("\n"); + sb.append("Method : " + request.getMethod()).append("\n"); + sb.append("User Agent : " + request.getHeader("User-Agent")).append("\n"); + sb.append("Session : " + request.getSession().getId()).append("\n"); + sb.append("Locale : " + request.getLocale().getCountry()).append("\n"); + sb.append("ContentType : " + request.getContentType()).append("\n"); + sb.append("----- Parameters ----- \n"); Enumeration e = request.getParameterNames(); - if (e.hasMoreElements()) { String pName = ""; String pValue = ""; @@ -144,14 +168,15 @@ log.debug("###################################{}",rtnObj.getClass()); } else { sb.append(" is Empty \n"); } - sb.append("=========================================================================//"); - log.debug(sb.toString()); - sb = null; + sb.append("=========================================================================//"); + + log.debug(sb.toString()); + sb = null; } } private Map getPageInfoMap(Paginator paginator){ - Map map = new HashMap(); + Map map = new HashMap(); //map.put("recods", paginator.getTotalCount()); map.put("totalPage", paginator.getTotalPages()); map.put("totalCount", paginator.getTotalCount()); diff --git a/src/main/java/kr/xit/framework/core/config/ThymeleafViewResolverConfig.java b/src/main/java/kr/xit/framework/core/config/ThymeleafViewResolverConfig.java new file mode 100644 index 00000000..c81d13ef --- /dev/null +++ b/src/main/java/kr/xit/framework/core/config/ThymeleafViewResolverConfig.java @@ -0,0 +1,54 @@ +package kr.xit.framework.core.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.MessageSource; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.ViewResolver; +import org.thymeleaf.spring5.SpringTemplateEngine; +import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver; +import org.thymeleaf.spring5.view.ThymeleafViewResolver; + +import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect; +import nz.net.ultraq.thymeleaf.layoutdialect.decorators.strategies.GroupingStrategy; + +@Configuration +public class ThymeleafViewResolverConfig { + + @Bean + public SpringResourceTemplateResolver templateResolver() { + SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver(); + //templateResolver.setPrefix("classpath:/templates"); + templateResolver.setPrefix("/WEB-INF/templates/"); + templateResolver.setCharacterEncoding("UTF-8"); + templateResolver.setSuffix(".html"); + templateResolver.setTemplateMode("HTML5"); + templateResolver.setCacheable(false); + return templateResolver; + } + + @Bean + public SpringTemplateEngine templateEngine(MessageSource messageSource) { + SpringTemplateEngine templateEngine = new SpringTemplateEngine(); + templateEngine.setTemplateResolver(templateResolver()); + templateEngine.setTemplateEngineMessageSource(messageSource); + templateEngine.addDialect(layoutDialect()); + + return templateEngine; + } + + @Bean + public LayoutDialect layoutDialect() { + return new LayoutDialect(new GroupingStrategy()); + } + + @Bean + @Autowired + public ViewResolver viewResolver(MessageSource messageSource) { + ThymeleafViewResolver viewResolver = new ThymeleafViewResolver(); + viewResolver.setTemplateEngine(templateEngine(messageSource)); + viewResolver.setCharacterEncoding("UTF-8"); + viewResolver.setOrder(1); + return viewResolver; + } +} diff --git a/src/main/java/kr/xit/framework/core/resolver/vo/DataVO.java b/src/main/java/kr/xit/framework/core/resolver/vo/DataVO.java index 4b1da856..0269ba89 100644 --- a/src/main/java/kr/xit/framework/core/resolver/vo/DataVO.java +++ b/src/main/java/kr/xit/framework/core/resolver/vo/DataVO.java @@ -1,40 +1,40 @@ -package kr.xit.framework.core.resolver.vo; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - -@XmlRootElement(name = "result") -@XmlType(name="Data", namespace="kr.xit.framework.core.resolver.vo.Data", propOrder={"key", "value"}) -public class DataVO { - - String key; - String value; - - public String getKey() { - return key; - } - - @XmlElement(name="key") - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - @XmlElement(name="value") - public void setValue(String value) { - this.value = value; - } - - @Override - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append(getKey()); - sb.append("__"); - sb.append(getValue()); - return sb.toString(); - } -} +// package kr.xit.framework.core.resolver.vo; +// +// import javax.xml.bind.annotation.XmlElement; +// import javax.xml.bind.annotation.XmlRootElement; +// import javax.xml.bind.annotation.XmlType; +// +// @XmlRootElement(name = "result") +// @XmlType(name="Data", namespace="kr.xit.framework.core.resolver.vo.Data", propOrder={"key", "value"}) +// public class DataVO { +// +// String key; +// String value; +// +// public String getKey() { +// return key; +// } +// +// @XmlElement(name="key") +// public void setKey(String key) { +// this.key = key; +// } +// +// public String getValue() { +// return value; +// } +// +// @XmlElement(name="value") +// public void setValue(String value) { +// this.value = value; +// } +// +// @Override +// public String toString() { +// StringBuffer sb = new StringBuffer(); +// sb.append(getKey()); +// sb.append("__"); +// sb.append(getValue()); +// return sb.toString(); +// } +// } diff --git a/src/main/java/kr/xit/framework/core/resolver/vo/Result.java b/src/main/java/kr/xit/framework/core/resolver/vo/Result.java index 8e87f646..d00865a8 100644 --- a/src/main/java/kr/xit/framework/core/resolver/vo/Result.java +++ b/src/main/java/kr/xit/framework/core/resolver/vo/Result.java @@ -1,81 +1,81 @@ -package kr.xit.framework.core.resolver.vo; - -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - -@XmlRootElement(name="result") -@XmlType(name="Result", namespace="kr.xit.framework.core.resolver.vo.Result", propOrder={"code", "message", "recordset"}) -public class Result { - - String code = ""; // 작업 결과 코드 - String message = ""; // 작업 결과 메시지 - - List recordset; // 결과셋 - - public Result(){ - - } - - public String getCode() { - return code; - } - - @XmlElement(name="code") - public void setCode(String code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - @XmlElement(name="message") - public void setMessage(String message) { - this.message = message; - } - - @XmlElementWrapper(name="recordset") - @XmlElementRefs({ - @XmlElementRef(name="record", type=DataVO.class) - }) - public List getRecordset() { - return recordset; - } - - public void setRecordset(List recordset) { - this.recordset = recordset; - } - - @Override - public String toString() { - StringBuffer result = new StringBuffer(); - result.append(code); - result.append("__"); - result.append(message); - - if(recordset != null){ - if(recordset.size() != 0){ - StringBuffer record = new StringBuffer(); - record.append("_^"); - boolean start = true; - for(T item : recordset){ - if(start){ - start = false; - }else{ - record.append("#!"); - } - record.append(item); - } - result.append(record.toString()); - } - } - - return result.toString(); - } -} +// package kr.xit.framework.core.resolver.vo; +// +// import java.util.List; +// +// import javax.xml.bind.annotation.XmlElement; +// import javax.xml.bind.annotation.XmlElementRef; +// import javax.xml.bind.annotation.XmlElementRefs; +// import javax.xml.bind.annotation.XmlElementWrapper; +// import javax.xml.bind.annotation.XmlRootElement; +// import javax.xml.bind.annotation.XmlType; +// +// @XmlRootElement(name="result") +// @XmlType(name="Result", namespace="kr.xit.framework.core.resolver.vo.Result", propOrder={"code", "message", "recordset"}) +// public class Result { +// +// String code = ""; // 작업 결과 코드 +// String message = ""; // 작업 결과 메시지 +// +// List recordset; // 결과셋 +// +// public Result(){ +// +// } +// +// public String getCode() { +// return code; +// } +// +// @XmlElement(name="code") +// public void setCode(String code) { +// this.code = code; +// } +// +// public String getMessage() { +// return message; +// } +// +// @XmlElement(name="message") +// public void setMessage(String message) { +// this.message = message; +// } +// +// @XmlElementWrapper(name="recordset") +// @XmlElementRefs({ +// @XmlElementRef(name="record", type=DataVO.class) +// }) +// public List getRecordset() { +// return recordset; +// } +// +// public void setRecordset(List recordset) { +// this.recordset = recordset; +// } +// +// @Override +// public String toString() { +// StringBuffer result = new StringBuffer(); +// result.append(code); +// result.append("__"); +// result.append(message); +// +// if(recordset != null){ +// if(recordset.size() != 0){ +// StringBuffer record = new StringBuffer(); +// record.append("_^"); +// boolean start = true; +// for(T item : recordset){ +// if(start){ +// start = false; +// }else{ +// record.append("#!"); +// } +// record.append(item); +// } +// result.append(record.toString()); +// } +// } +// +// return result.toString(); +// } +// } diff --git a/src/main/resources/spring/mvc/mvc-resolver.xml b/src/main/resources/spring/mvc/mvc-resolver.xml index b3ad8946..c25bfded 100644 --- a/src/main/resources/spring/mvc/mvc-resolver.xml +++ b/src/main/resources/spring/mvc/mvc-resolver.xml @@ -49,10 +49,10 @@ - - @@ -60,6 +60,7 @@ /WEB-INF/tiles/layout-tiles-defs.xml + @@ -114,11 +115,8 @@ - - - - + + + diff --git a/src/main/webapp/WEB-INF/ftl/hello.ftl b/src/main/webapp/WEB-INF/ftl/hello.ftl deleted file mode 100644 index 6acd18b1..00000000 --- a/src/main/webapp/WEB-INF/ftl/hello.ftl +++ /dev/null @@ -1,10 +0,0 @@ -<#ftl encoding="utf-8"/> - - - - 네이바 프리마카 - - -

컨트롤러의 메세지: ${message}

- - diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp.incTabBackup b/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp.incTabBackup deleted file mode 100644 index 2ca048bf..00000000 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp.incTabBackup +++ /dev/null @@ -1,386 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%> - -
- - - - -
- -
-
-
    - - - -
  • - -
  • - - - - - - - - - - - - -
-
전체 ㅣ 0
-
- - -
-
- - -
-
-
-
-
-
-
-
-
- - - -
- -
- -
- - - - - - - diff --git a/src/main/webapp/WEB-INF/templates/base/error/error.html b/src/main/webapp/WEB-INF/templates/base/error/error.html new file mode 100644 index 00000000..5d7741d6 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/base/error/error.html @@ -0,0 +1,46 @@ + + + + + +Board Error Message + + + +
+ + + +
+ 에러 + + + + + +
+ + + +
오류발생 알림화면(허용되지 않는 요청을 하셨습니다)
+ +
+

ERROR Page

+
+

[[${message}]]

+
+
+
+ +
+ + + + + + + diff --git a/src/main/webapp/WEB-INF/templates/layout/cmm_body.html b/src/main/webapp/WEB-INF/templates/layout/cmm_body.html new file mode 100644 index 00000000..553776d1 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/cmm_body.html @@ -0,0 +1,8 @@ + + +
+ +
+ diff --git a/src/main/webapp/WEB-INF/templates/layout/cmm_footer.html b/src/main/webapp/WEB-INF/templates/layout/cmm_footer.html new file mode 100644 index 00000000..88a0dca4 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/cmm_footer.html @@ -0,0 +1,11 @@ + + + +

+ cmmFooter 내용 +

+ + + diff --git a/src/main/webapp/WEB-INF/templates/layout/cmm_head.html b/src/main/webapp/WEB-INF/templates/layout/cmm_head.html new file mode 100644 index 00000000..8af9f1e7 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/cmm_head.html @@ -0,0 +1,15 @@ + + + + + + + + cmmHead title + + + + + diff --git a/src/main/webapp/WEB-INF/templates/layout/cmm_header.html b/src/main/webapp/WEB-INF/templates/layout/cmm_header.html new file mode 100644 index 00000000..666c9450 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/cmm_header.html @@ -0,0 +1,10 @@ + + + +

+ cmmHeader 내용 +

+
+ diff --git a/src/main/webapp/WEB-INF/templates/layout/cmm_script.html b/src/main/webapp/WEB-INF/templates/layout/cmm_script.html new file mode 100644 index 00000000..bcca33c8 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/cmm_script.html @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/templates/layout/cmm_style.html b/src/main/webapp/WEB-INF/templates/layout/cmm_style.html new file mode 100644 index 00000000..dabeec62 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/cmm_style.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/templates/layout/cmm_style__.html b/src/main/webapp/WEB-INF/templates/layout/cmm_style__.html new file mode 100644 index 00000000..a01753e0 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/cmm_style__.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/templates/layout/layout_biz.html b/src/main/webapp/WEB-INF/templates/layout/layout_biz.html new file mode 100644 index 00000000..c79fae1c --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/layout_biz.html @@ -0,0 +1,23 @@ + + + + + + +
+ +
+ + + +
+ +
+ + + + + + diff --git a/src/main/webapp/WEB-INF/templates/layout/layout_main.html b/src/main/webapp/WEB-INF/templates/layout/layout_main.html new file mode 100644 index 00000000..1a28abc3 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/layout/layout_main.html @@ -0,0 +1,44 @@ + + + + + + + + + +
+ + +
+ +
+ + + + + +
+ +
+
    +
    + +
    + + +
    + +
    + +
    + + + + + + diff --git a/src/main/webapp/WEB-INF/templates/list.html b/src/main/webapp/WEB-INF/templates/list.html new file mode 100644 index 00000000..44f9e9f7 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/list.html @@ -0,0 +1,11 @@ + + + + + + 업무영역~~ + + +