일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- db
- 백준
- JPQL
- 인프런
- 그리디
- Spring Boot
- Exception
- transaction
- 스프링 핵심 원리
- kotlin
- java
- 스프링 핵심 기능
- springdatajpa
- Thymeleaf
- Servlet
- jpa
- 스프링
- Proxy
- 김영한
- Greedy
- spring
- pointcut
- JDBC
- SpringBoot
- http
- 자바
- Android
- AOP
- 알고리즘
- QueryDSL
- Today
- Total
목록@{...} (2)
개발자되기 프로젝트
1. URL 링크 사용법 URL 링크 생성할 경우 @{...} 사용 2. 예시 2.1 Controller @GetMapping("/link") public String link(Model model){ model.addAttribute("param1", "data1"); model.addAttribute("param2", "data2"); return "basic/link"; } 2.2 link.html ()로 뒤에 붙은 파라미터 중 PathVariable로 사용 안된 Parameter는 QueryParameter로 사용됨. basic url --> url : localhost:8080/hello 이동 hello queryparam QueryParameter --> url : localhost:8080/..
1. Controller ItemRepository는 final로 선언. 그리고 Constructor를 통해 주입받음. ->lombok 이용 생성자가 딱 한개 있으면 @Autowired생략 가능. @Controller @RequestMapping("/basic/items") @RequiredArgsConstructor public class BasicItemController { private final ItemRepository itemRepository; @GetMapping public String items(Model model){ List items = itemRepository.findAll(); model.addAttribute("items", items); return "basic/item..