일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- JPQL
- Exception
- springdatajpa
- db
- 스프링 핵심 원리
- Proxy
- 백준
- 알고리즘
- Servlet
- 스프링 핵심 기능
- http
- kotlin
- Spring Boot
- jpa
- SpringBoot
- pointcut
- JDBC
- java
- 김영한
- 스프링
- Thymeleaf
- transaction
- Greedy
- AOP
- 자바
- spring
- QueryDSL
- 그리디
- 인프런
- Android
- Today
- Total
목록controller (3)
개발자되기 프로젝트
1. Controller개발 @GetMapping("/v2/members") public Page searchMemberV2(@ModelAttribute MemberSearchCondition condition, Pageable pageable){ return memberRepository.searchPageSimple(condition, pageable); } @GetMapping("/v3/members") public Page searchMemberV3(@ModelAttribute MemberSearchCondition condition, Pageable pageable){ return memberRepository.searchPageComplex(condition, pageable); } Query..
데이터 확인을 위해서 샘플 데이터를 추가하자. 테스트케이스 실행에 영향을 주지 않기 위해 톰캣이 돌아갈 때만 샘플 데이터가 들어가도록 설정하자. --> 테스트케이스, 톰캣의 프로파일 분리 1. 프로파일 설정 main.resources.application.yml test.resources.application.yml 2. 샘플 데이터 추가 @Profile 을 통해 application.yml의 active와 대응됨. @PostConstruct : bean 생성 이후 해당 메서드 실행. JPA 데이터 변경은 Transaction안에서 이루어져야함 @Profile("local") @Component @RequiredArgsConstructor public class InitMember { private fi..
1. HomeController @Controller public class HomeController { @GetMapping("/") public String home(){ return "home"; } } 엇? welcome page에 들어가지 않고 home.html로 연결된다. 그 이유는 해당 url에 Mapping된 controller가 static보다 우선순위가 높기 때문이다. 2. home.html Hello Spring 회원 기능 회원 가입 회원 목록 3. 실행화면 4. createMembersForm.html 이름 등록 입력 양식 전체를 감싸는 태그 태그의 action 속성은 폼 데이터(form data)를 서버로 보낼 때 해당 데이터가 도착할 URL을 명시. 의 name은 spring에..