Procházet zdrojové kódy

기동 시 가져왔던 카테고리가 null일 때만 가져오는 것에서 캐싱으로 처리하고 있으므로 무조건 가져오도록 수정

gagamel před 5 roky
rodič
revize
b708994034

+ 7 - 3
src/main/java/com/style24/front/support/controller/TsfBaseController.java

@@ -48,6 +48,9 @@ public class TsfBaseController {
 	@Autowired
 	private TscMessageByLocale message;
 
+	@Autowired
+	private TsfEnvsetInfo envsetInfo;
+
 	/**
 	 * Json data 형식 외의 모든 문자열의 앞, 뒤 공백 제거
 	 * Json data 형식의 모든 문자열의 앞, 뒤 공백 제거 시는 AdmStringTrim에서 처리 (@RequestBody annotation 이용 시)
@@ -104,8 +107,8 @@ public class TsfBaseController {
 	 */
 	@ModelAttribute("metaInfo")
 	public Meta getMetaInfo() {
-//		return TsfEnvsetInfo.getInstance().getMetaInfo();
-		return (new TsfEnvsetInfo()).getMetaInfo();
+		return envsetInfo.getMetaInfo();
+//		return (new TsfEnvsetInfo()).getMetaInfo();
 	}
 
 	/**
@@ -114,7 +117,8 @@ public class TsfBaseController {
 	 */
 	@ModelAttribute("allCateList")
 	public Collection<Cate1> getAllCateList() {
-		return (new TsfEnvsetInfo()).getAllCateList();
+//		return (new TsfEnvsetInfo()).getAllCateList();
+		return envsetInfo.getAllCateList();
 	}
 
 	@ModelAttribute("osType")

+ 6 - 5
src/main/java/com/style24/front/support/startup/TsfEnvsetInfo.java

@@ -67,11 +67,12 @@ public class TsfEnvsetInfo {
 	 * @return
 	 */
 	public Collection<Cate1> getAllCateList() {
-		if (allCateList == null) {
-			allCateList = displayService.getAllCategoryList(TsfConstants.CateGb.BYITEM.value());
-		}
-
-		return allCateList;
+//		if (allCateList == null) {
+//		allCateList = displayService.getAllCategoryList(TsfConstants.CateGb.BYITEM.value());
+//		}
+//
+//		return allCateList;
+		return displayService.getAllCategoryList(TsfConstants.CateGb.BYITEM.value());
 	}
 
 }