From 7fb8577e6a61a53033bbffda9d1c1d60a014aca3 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 2 May 2023 18:24:41 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=B0=9C=EB=A6=AC=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/framework/biz/cmm/web/XitFrameUtilController.java | 3 ++- .../core/config/ThymeleafViewResolverConfig.java | 8 ++++++-- src/main/resources/spring/mvc/mvc-resolver.xml | 3 --- .../webapp/WEB-INF/jsp/{framework => }/util/validator.jsp | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) rename src/main/webapp/WEB-INF/jsp/{framework => }/util/validator.jsp (72%) diff --git a/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameUtilController.java b/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameUtilController.java index 64554d2a..411cf2b8 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameUtilController.java +++ b/src/main/java/kr/xit/framework/biz/cmm/web/XitFrameUtilController.java @@ -34,7 +34,8 @@ public class XitFrameUtilController { */ @RequestMapping(value="validator", method={RequestMethod.GET, RequestMethod.POST}) public String validate() { - return "framework/util/validator"+TILES_TYPE.NONE.getVal(); + + return "util/validator"; } /** diff --git a/src/main/java/kr/xit/framework/core/config/ThymeleafViewResolverConfig.java b/src/main/java/kr/xit/framework/core/config/ThymeleafViewResolverConfig.java index e2ba2aab..81afdc11 100644 --- a/src/main/java/kr/xit/framework/core/config/ThymeleafViewResolverConfig.java +++ b/src/main/java/kr/xit/framework/core/config/ThymeleafViewResolverConfig.java @@ -19,11 +19,14 @@ public class ThymeleafViewResolverConfig { public SpringResourceTemplateResolver templateResolver() { SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver(); //templateResolver.setPrefix("classpath:/templates"); + templateResolver.setPrefix("/WEB-INF/templates/thymeleaf"); - templateResolver.setCharacterEncoding("UTF-8"); templateResolver.setSuffix(".html"); + + templateResolver.setCharacterEncoding("UTF-8"); templateResolver.setTemplateMode("HTML5"); templateResolver.setCacheable(false); + return templateResolver; } @@ -33,7 +36,6 @@ public class ThymeleafViewResolverConfig { templateEngine.setTemplateResolver(templateResolver()); templateEngine.setTemplateEngineMessageSource(messageSource); templateEngine.addDialect(layoutDialect()); - return templateEngine; } @@ -48,6 +50,8 @@ public class ThymeleafViewResolverConfig { ThymeleafViewResolver viewResolver = new ThymeleafViewResolver(); viewResolver.setTemplateEngine(templateEngine(messageSource)); viewResolver.setCharacterEncoding("UTF-8"); + String[] viewNames = {"thymeleaf"}; + viewResolver.setViewNames(viewNames); viewResolver.setOrder(1); return viewResolver; } diff --git a/src/main/resources/spring/mvc/mvc-resolver.xml b/src/main/resources/spring/mvc/mvc-resolver.xml index 546142c9..3a747932 100644 --- a/src/main/resources/spring/mvc/mvc-resolver.xml +++ b/src/main/resources/spring/mvc/mvc-resolver.xml @@ -78,9 +78,6 @@ --> - - - diff --git a/src/main/webapp/WEB-INF/jsp/framework/util/validator.jsp b/src/main/webapp/WEB-INF/jsp/util/validator.jsp similarity index 72% rename from src/main/webapp/WEB-INF/jsp/framework/util/validator.jsp rename to src/main/webapp/WEB-INF/jsp/util/validator.jsp index 1b0828ea..948012b1 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/util/validator.jsp +++ b/src/main/webapp/WEB-INF/jsp/util/validator.jsp @@ -1,3 +1,3 @@ -<%@ page language="java" contentType="javascript/javascript" %> +<%@ page language="java" contentType="text/javascript" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>