강의

멘토링

로드맵

인프런 커뮤니티 질문&답변

박민규님의 프로필 이미지
박민규

작성한 질문수

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

주문 목록 검색, 취소

오류 질문 드립니다

작성

·

1.1K

0

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/order/orderList.html]")] with root cause

Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'orderPrice' cannot be found on object of type 'jpabook.jpashop.domain.OrderItem' - maybe not public or not valid?

이런 오류가 나오고 뷰 화면에서 

<td th:text="${item.orderItems[0].orderPrice}"></td>

여기를 주석치면 정상동작 하고 아니면 오류가 나는데 어느쪽 문제일까요 ?

퀴즈

61%나 틀려요. 한번 도전해보세요!

회원 가입 시 화면 입력 데이터를 엔티티 객체 대신 별도의 Form 객체로 받는 주된 이유는 무엇일까요?

데이터베이스 성능을 최적화하기 위해서

화면 종속적인 데이터나 유효성 검증 로직을 분리하기 위해서

JPA 영속성 컨텍스트와 직접적인 관계를 맺기 위해서

코드의 자동 생성 기능을 활용하기 위해서

답변 2

0

김영한님의 프로필 이미지
김영한
지식공유자

안녕하세요. 민규님

OrderItem.getOrderPrice() 메서드가 있는지 확인해보시겠어요?

0

박민규님의 프로필 이미지
박민규
질문자

보면 디비에도 잘 들어가고 빠지고 하는데 출력이 안되는 이유가 뭘까요

박민규님의 프로필 이미지
박민규

작성한 질문수

질문하기