From d488fbb9d39bbd799fa8748224464458567bc845 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Wed, 7 Jun 2023 15:25:27 +0900 Subject: [PATCH] =?UTF-8?q?jdk=201.8=20->=2017,=20@Component("...")=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 6 +++--- src/main/java/cokr/xit/base/menu/Menu.java | 2 ++ src/main/java/cokr/xit/base/menu/web/MenuInjector.java | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 2c53a93..7f59dbf 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 1.8 + 17 ${java.version} ${java.version} @@ -120,8 +120,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.8 - 1.8 + ${java.version} + ${java.version} UTF-8 diff --git a/src/main/java/cokr/xit/base/menu/Menu.java b/src/main/java/cokr/xit/base/menu/Menu.java index e355a93..dd69cf3 100644 --- a/src/main/java/cokr/xit/base/menu/Menu.java +++ b/src/main/java/cokr/xit/base/menu/Menu.java @@ -211,6 +211,8 @@ public class Menu extends AbstractEntity { * @return DataObject */ public DataObject toDataObject(List urls) { + if (action == null) + action = ""; boolean include = urls.contains(action) || urls.equals(UserInfo.ALL_ACTIONS); if (!include && Assert.isEmpty(children)) return null; diff --git a/src/main/java/cokr/xit/base/menu/web/MenuInjector.java b/src/main/java/cokr/xit/base/menu/web/MenuInjector.java index d684b27..b69a305 100644 --- a/src/main/java/cokr/xit/base/menu/web/MenuInjector.java +++ b/src/main/java/cokr/xit/base/menu/web/MenuInjector.java @@ -62,6 +62,8 @@ public class MenuInjector extends RequestInterceptor { private static final String[] STOP = {"login", "error", "downloadView"}; private String getRespType(HttpServletRequest hreq, ModelAndView mav) { + if (mav == null) + return NONE; String viewName = mav.getViewName(); for (String stop: STOP) { if (viewName.contains(stop))