일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- 도커
- 리눅스
- JSP
- 컨트롤러
- MySQL
- JS
- 코테
- select
- 프로그래머스
- 동적
- 테이블
- DATE_FORMAT
- 명령어
- like
- 백틱
- 배열
- Spring
- oracle
- 인라인뷰
- Update
- 변수
- 동적테이블
- option태그
- post방식
- 함수
- JavaScript
- SQL
- Ajax
- order by
- 자바스크립트
- Today
- Total
목록Deveolpment Study🗂️/Spring Framework (18)
bom's happy life
@ResponseBody 사용하면 보통 List배열 형태로는 ajax에서 못 받는 것 같고배열형태를 String으로 보내서 ajax에서 받고, ajax에서 json으로 변환해서 사용해야 하면 된다. @ResponseBody@RequestMapping(value = "/findAvailableTimes.do", method = RequestMethod.GET)public String findAvailableTimes(Model model, @ModelAttribute PassportInfoVO passportInfoVO) throws Exception { List list = passportService.findAvailableTimes(passportInfoVO); JSONArray resul..
//전체휴가현황리스트 List list = vacationService.findAllVacationApplyList(vacationApplyVo); //model.addAttribute("list", list); for(VacationApplyVo vo : list) { int seq = vo.getSeq(); //사용일 구하는 로직에 seq담기 float appDate = vacationService.findAppDateFromVacation(seq); vo.setAppDate(appDate); } model.addAttribute("list", list); 기존 list에 내가 새로 만든 appDate를 추가하려고함. list를 먼저구하고, 반복문으로 list의 seq들을 뽑아내서 vacationSe..
@RestController는 @Controller에 @ResponseBody가 추가된 것입니다. 당연하게도 RestController의 주용도는 Json 형태로 객체 데이터를 반환하는 것입니다. 최근에 데이터를 응답으로 제공하는 REST API를 개발할 때 주로 사용하며 객체를 ResponseEntity로 감싸서 반환합니다. 이러한 이유로 동작 과정 역시 @Controller에 @ReponseBody를 붙인 것과 완벽히 동일합니다. @Controller와 @RestController의 차이점 https://mangkyu.tistory.com/49 [Spring] @Controller와 @RestController 차이 Spring에서 컨트롤러를 지정해주기 위한 어노테이션은 @Controller와 @Re..