Browse Source

페이징 오류 수정

junekeunsong 4 years ago
parent
commit
f8c5e86b1a

+ 1 - 5
src/main/java/com/lemon/lifecenter/common/LifeCenterPaging.java

@@ -7,9 +7,6 @@ public class LifeCenterPaging {
     
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
     
-    
-    private static LifeCenterConfigVO config;
-    
     private int pageSize = 0; // 게시 글 수
     private int firstPageNo = 0; // 첫 번째 페이지 번호
     private int prevPageNo = 0; // 이전 페이지 번호
@@ -27,7 +24,6 @@ public class LifeCenterPaging {
     
     public static LifeCenterPaging getInstance() {
         if (instance == null) {
-            config = new LifeCenterConfigVO();
             instance = new LifeCenterPaging();
         } else {
             return instance;
@@ -58,7 +54,7 @@ public class LifeCenterPaging {
 //        this.makePaging();
 //    }
     
-    public void paging(int total, int page, String param) {
+    public void paging(LifeCenterConfigVO config, int total, int page, String param) {
         System.out.println( "3s page : " + page );
         System.out.println( "3s total : " + total );
         System.out.println( "param : " + param );

+ 1 - 1
src/main/java/com/lemon/lifecenter/controller/PatientController.java

@@ -66,7 +66,7 @@ public class PatientController extends LifeCenterController {
         
         String param = "patientName=" + patientName + "&inputState=" + inputState + "&startDate=" + startDate + "&endDate=" + endDate;
         paging = LifeCenterPaging.getInstance();
-        paging.paging(total, page, param);
+        paging.paging(config, total, page, param);
         
         mv.addObject("inputState", inputState);
         mv.addObject("patientName", patientName);