강의

멘토링

커뮤니티

Inflearn Community Q&A

odark2076's profile image
odark2076

asked

Practical web development using Java Spring Boot

Processing lists/registrations and activating current menus

modelAndView null 현상

Written on

·

865

0

menuType을 postHandle쪽에 설정해주셨는데
동일하게 했더니 페이지 이동때나 controller를 통해 이동되는경우에 호출되는것 같은데 2번또는 3번은 기본적으로 호출되는것 같은데
최초는 문제가 안되는데 2번또는 3번째는 modelAndView가 null 로 되어 에러가 지속적으로 뜨는것 같습니다.
화면작동상에는 문제가 없는데 지속적으로 이클립스 콘솔에 에러로그가 올라오네요
Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.ModelAndView.addObject(String, Object)" because "modelAndView" is null
if (handler instanceof HandlerMethod) { logger.info("modelAndView : {}", modelAndView); modelAndView.addObject("menuTypes", MenuType.values()); }
spring-boot

Answer

This question is waiting for answers
Be the first to answer!
odark2076's profile image
odark2076

asked

Ask a question