fix(sample): 목록 No 칼럼이 한 페이지 행수로 pageSize 를 써 번호가 어긋나는 문제 수정 - #51
Merged
jei007 merged 1 commit intoSep 9, 2026
Merged
Conversation
EgovSampleController 는 한 페이지 행수를 pageUnit 으로 정해 PaginationInfo.recordCountPerPage 에 넣고, 매퍼가 그 값으로 조회 범위를 자른다. pageSize 는 페이저에 찍을 페이지 번호 개수라 행수가 아니다. 목록 No 칼럼이 행수 자리에 pageSize 를 쓰고 있어 두 값이 갈리는 순간부터 번호가 어긋난다. pageUnit 5·pageSize 10 이면 2쪽 첫 행이 109 대신 104 로 찍힌다. No 칼럼의 EL 식을 실제 모델로 평가하는 테스트를 함께 넣는다.
jei007
approved these changes
Sep 9, 2026
jei007
left a comment
Contributor
There was a problem hiding this comment.
표준프레임워크에 대한 지속적인 참여에
대단히 감사드립니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
수정 사유 Reason for modification
소스를 수정한 사유가 무엇인지 체크해 주세요. Please check the reason you modified the source. ([X] X는 대문자여야 합니다.)
수정된 소스 내용 Modified source
검토자를 위해 수정된 소스 내용을 설명해 주세요. Please describe the modified source for reviewers.
문제
egovSampleList.jsp의 No 칼럼이 한 페이지 행수 자리에pageSize를 씁니다.같은 응답을 만든
EgovSampleController는 한 페이지 행수를pageUnit으로 정합니다.getFirstRecordIndex()·getLastRecordIndex()가recordCountPerPage로 조회 범위를 잡고EgovSample_Sample_SQL.xml의LIMIT #{recordCountPerPage}가 그 값으로 자릅니다.pageSize는PaginationInfo에서getFirstPageNoOnPageList()·getLastPageNoOnPageList()계산에만 쓰이는 값, 즉 페이저에 찍을 페이지 번호 개수입니다.context-properties.xml이pageUnit과pageSize를 둘 다 10 으로 두어 기본 설정에서는 두 식이 같은 값을 냅니다. 한쪽만 바꾸면 갈라집니다.수정
행수 자리에 조회에 실제로 쓰인 값을 씁니다.
EgovSampleListJspRowNumberTest를 함께 넣었습니다. JSP 에서 이 식을 뽑아 실제PaginationInfo·SampleDefaultVO로 평가하는 테스트입니다. JSP 한 줄만 남기는 편을 선호하시면 빼겠습니다.JUnit 테스트 JUnit tests
테스트를 완료하셨으면 다음 항목에 [대문자X]로 표시해 주세요. When you're done testing, check the following items.
pom.xml의 surefire 설정이<skipTests>true</skipTests>라 그대로 두면 실행되지 않습니다. 아래는 그 값을false로 두고mvn -Ptest test로 돌린 결과입니다. EL 구현체인expressly가test프로필에만 선언돼 있어 프로필 없이 돌리면 이 테스트가 EL provider 를 못 찾습니다.수정 전
수정 후
전체 스위트는 같은 워크트리에서 이 수정만 토글해 대조했습니다. 수정 있음
Tests run: 10, Failures: 0, 수정 없음Tests run: 10, Failures: 1이고 그 1건이 위 테스트입니다.테스트 브라우저 Test Browser
테스트를 진행한 브라우저를 선택해 주세요. Please select the browser(s) you ran the test on. (다중 선택 가능 you can select multiple) [X] X는 대문자여야 합니다.
mvn package로 만든 WAR 를tomcat:10.1-jdk17-temurin에 올리고 명령행 HTTP 클라이언트로 응답을 받았습니다.테스트 스크린샷 또는 캡처 영상 Test screenshots or captured video
테스트 전과 후의 스크린샷 또는 캡처 영상을 이곳에 첨부해 주세요. Please attach screenshots or video captures of your before and after tests here.
스크린샷 대신 실제 응답에서 뽑은 No 칼럼과 ID 를 옮깁니다.
context-properties.xml의pageUnit만 5 로 두고pageSize는 10 그대로입니다(전체 114건).기본 설정인
pageUnit10 ·pageSize10 에서는 2쪽 첫 행이 수정 전후 모두104 SAMPLE-00104로 같습니다.