최종 변경 : 2023.12.30


회원가입 로직

image.png


JoinDTO

@Setter
@Getter
public class JoinDTO {

    private String username;
    private String password;
}

JoinController

@Controller
@ResponseBody
public class JoinController {
    
    private final JoinService joinService;

    public JoinController(JoinService joinService) {
        
        this.joinService = joinService;
    }

    @PostMapping("/join")
    public String joinProcess(JoinDTO joinDTO) {

        System.out.println(joinDTO.getUsername());
        joinService.joinProcess(joinDTO);

        return "ok";
    }
}