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 |
Tags
- 스프링 핵심 원리
- 열혈 tcp/ip 프로그래밍
- Window-Via-c/c++
- C++
- FIFO paging
- 이펙티브코틀린
- 10026번
- redis
- 2475번
- 우아한레디스
- Operating System
- Spring
- 우아한 테크 세미나
- Operating System.
- n타일링2
- 운영체제
- 토마토
- TCP/IP
- HTTP
- 제프리리처
- C#
- inflearn
- 윤성우 저자
- 에러핸들링
- 열혈 TCP/IP 소켓 프로그래밍
- Four Squares
- BOJ
- 스프링 입문
- OS
- 김영한
Archives
- Today
- Total
나의 브을로오그으
#5. [스프링 입문] - 회원 웹 기능 본문
[홈 화면 추가]
[HomeController]

[templates/home.html]

[회원 웹 기능 등록]
[templates/members/createMembersForm.html]

[localhost:8080/members/new]

[templates/members/createMemberForm.html]

[MemberForm]

[HomeController]

1. localhost:8080/members/new에 매핑된 createFrom() 메소드 호출
2. 템플릿 엔진이 members/createMemberForm.html로 변환
3. 박스에 이름을 입력하고 등록 버튼 클릭
4. createMemberForm.html의 form에 추가된 속성 action("/members/new"), method("post") 방식으로 동작
(name이 서버로 넘어올 때 키 역할을 함.) 등록 버튼을 누르면, 스프링에서 MemberForm의 name 필드에 Setter를 호출해서 우리가 입력한 이름을 넣어서 create()메소드의 인자로 넘겨줌.
5. postMapping되어있는 create() 메소드 호출, memberService로 회원 등록, redirect로 다시 돌려보냄.
[회원 웹 기능 조회]
[templates/members/memberList.html]

[MemberController]

[결과]

'Spring' 카테고리의 다른 글
| #7. [스프링 입문] - AOP (0) | 2022.07.11 |
|---|---|
| #6. [스프링 입문] - 스프링 DB 접근 기술 (0) | 2022.07.11 |
| #4. [스프링 입문] - 스프링 빈과 의존관계 (0) | 2022.07.10 |
| #3. [스프링 입문] - 간단한 앱 개발 (0) | 2022.07.10 |
| #2. [스프링 입문] - 스프링 웹 개발 기초 (0) | 2022.07.09 |