Replies: 1 comment
-
| 최고 ! 마지막까지 더 파이팅합시다 ~! | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
5. 회원 관리 예제 - 웹 MVC 개발
1️⃣회원 웹 기능 - 홈 화면 추가
localhost:8080 → 스프링 컨테이너에서 URL 관련 맵핑을 찾는다. → 메소드 실행 끝
localhost:8080 → 스프링 컨테이너에서 URL 관련 맵핑을 찾는다. 없다 → 정적 메소드를 찾아서 실행
2️⃣회원 웹 기능 - 등록
➡️등록할 때 동작 과정
➡️등록할 때 코드 동작 과정
회원가입 버튼 클릭
viewResolver에서 templates에서 “members/createMemberForm”을 찾아서 반환해준다.
Thymeleaf 템플릿 엔진이 랜더링 해주고 화면을 뿌려준다.
input에서 name = “name”은 서버로 넘어올 때 키가 된다. input에 값을 넣어준 후 등록 버튼을 누르면
action="/members/new" 로 post방식으로 넘어간다.
Controller에서 action의 URL이 같은 걸로 호출이 된다.
MemberForm에 name에 값을 넣어준다. 주고 로직을 타고 redirect때문에 “/”로 넘어간다.
3️⃣회원 웹 기능 - 조회
회원 목록 클릭
호출되는 URL controller 에서 찾기
th:each타임리프 문법 → 루프를 돎Beta Was this translation helpful? Give feedback.
All reactions