Cute Happy Ghost
본문 바로가기
728x90
SMALL

JAVA116

controller에서 url로 동적 매핑하기 @PathVariable 테이블 n개를 조회하고싶은데 sql 및 controller구조가 똑같을 때 많이 쓰면 비효율적이니까 한번에 쓰기 위한 ! @RequestMapping("/api/List/{id}") @ResponseBody public Map selectList(@PathVariable("id") String id) throws Exception { ... HashMap resultMap = new HashMap(); //데이터 List list = apiService.selectList(id); resultMap.put("data",list); return resultMap; } requestMapping에 동적으로 받을 애를 { }안에 써주고 ex) {id} @PathVariable("id") String id로 받.. 2022. 3. 25.
enum의 name()과 tostring()의 차이점 The main difference between name() and toString() is that name() is a final method, so it cannot be overridden. The toString() method returns the same value that name() does by default, but toString() can be overridden by subclasses of Enum. Therefore, if you need the name of the field itself, use name(). If you need a string representation of the value of the field, use toString(). => 쉽게 말해 tos.. 2022. 1. 10.
이클립스 폰트 추천, 폰트 설정, 개발 코딩 폰트 추천 ubuntu mono ubuntu(기본은 좀 좁은 느낌 너무 붙어있어서 난 별로였다) https://github.com/powerline/fonts/tree/master/UbuntuMono GitHub - powerline/fonts: Patched fonts for Powerline users. Patched fonts for Powerline users. Contribute to powerline/fonts development by creating an account on GitHub. github.com fira code https://fonts.google.com/specimen/Fira+Code D2Coding https://github.com/naver/d2codingfont/releases.. 2022. 1. 10.
session time변경 httpSession.setMaxInactiveInterval(3600); 초단위라서 1800이면 30분 3600이면 1시간 2021. 12. 2.
728x90
LIST