반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- 자료구조
- 머신러닝
- web
- classification
- pycharm
- cudnn
- 데이터전문기관
- bccard
- web 개발
- Keras
- postorder
- CES 2O21 참여
- web 용어
- discrete_scatter
- web 사진
- C언어
- KNeighborsClassifier
- 웹 용어
- mglearn
- CES 2O21 참가
- vscode
- tensorflow
- 대이터
- paragraph
- 결합전문기관
- java역사
- html
- broscoding
- inorder
- 재귀함수
Archives
- Today
- Total
bro's coding
java.controller.service.paging(pageHelper) 본문
반응형
package com.example.newsAnalysis.service;
import com.example.newsAnalysis.mapper.CollectionMapper;
import com.example.newsAnalysis.model.CollectionInfoVO;
import com.example.newsAnalysis.model.CollectionStatusVO;
import com.example.newsAnalysis.model.InputVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CollectionDataService {
@Autowired
CollectionMapper mapper;
public List<CollectionStatusVO> dataStatus(InputVO inputVO) {
return mapper.dataStatus(inputVO);
}
/***
* paging 처리를 반영한 dataCollectionInfo List
* @param inputVO
* @return
*/
public Page<CollectionInfoVO> dataInfo(InputVO inputVO) {
// paging 처리(pagehelper)
PageHelper.startPage(inputVO.getPageNum(), 10);
// url mapping
Page<CollectionInfoVO> list = mapper.dataInfo(inputVO);
for (CollectionInfoVO vo : list
) {
vo.setUrl("https://news.v.daum.net/v/" + vo.getUrl());
}
return list;
}
}
반응형
'[IT] > java' 카테고리의 다른 글
java.Paging (0) | 2021.05.04 |
---|---|
java.chatAt(문자열 index char 비교) (0) | 2021.05.03 |
java.loop (1) | 2021.04.23 |
java.DBCP (1) | 2021.04.21 |
java.DB date type.상품 등록일시 조회 (0) | 2021.04.21 |
java. uri에서 contextPath와 .do를 제외한 FindCarController추출 (0) | 2021.04.19 |
java.요청url (0) | 2021.04.19 |
java.동적 객체 생성 및 메소드 실행 (0) | 2021.04.19 |
Comments