-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: cors origin 세팅 * chore: 테스트 코드 내 불필요 코드 삭제 * chore: 불필요 코드 삭제 * refactor: 회원가입시 모든 이메일 입력가능 * test: 테스트 데이터 사입 SQL 변경
- Loading branch information
Showing
13 changed files
with
83 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
...ain/java/com/keunsori/keunsoriserver/domain/member/sign_up/dto/request/SignUpRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
package com.keunsori.keunsoriserver.domain.member.sign_up.dto.request; | ||
|
||
import jakarta.validation.constraints.Email; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Pattern; | ||
|
||
import com.keunsori.keunsoriserver.domain.member.domain.Member; | ||
import com.keunsori.keunsoriserver.domain.member.domain.vo.MemberStatus; | ||
|
||
|
||
public record SignUpRequest( | ||
@NotBlank(message = "이름은 필수 입력값입니다.") | ||
@Pattern(regexp="[가-힣]{1,6}$", message = "이름은 6자 이하로 입력해주세요.") | ||
@Pattern(regexp="[가-힣]{1,6}$", message = "이름은 한글 6자 이하로 입력해주세요.") | ||
String name, | ||
|
||
@NotBlank(message = "학번은 필수 입력값입니다.") | ||
@Pattern(regexp="^[a-zA-Z][0-9]{6}", message="학번을 제대로 입력해주세요.") | ||
String studentId, | ||
|
||
@NotBlank(message="홍익대학교 이메일은 필수 입력값입니다.") | ||
@Pattern(regexp="^.{1,}@g\\.hongik\\.ac\\.kr$",message="이메일은 학생이메일입니다. ex)[email protected]") | ||
String hongikgmail, | ||
@NotBlank(message="이메일은 필수 입력값입니다.") | ||
@Email(message = "이메일 형식이 올바르지 않습니다.") | ||
String email, | ||
|
||
@NotBlank(message = "비밀번호는 필수 입력값입니다.") | ||
@Pattern(regexp="^(?=.*[!@#$%^&*(),.?\":{}|<>])[a-zA-Z0-9!@#$%^&*(),.?\":{}|<>]{8,25}$",message="비밀번호는 특수문자, 영문자, 숫자를 포함한 8자리 이상 문자열입니다.") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
public record SignUpResponse(String name, | ||
String studentId, | ||
String hongikgmail) {} | ||
String email) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 16 additions & 12 deletions
28
src/main/java/com/keunsori/keunsoriserver/global/config/WebConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
package com.keunsori.keunsoriserver.global.config; | ||
|
||
import static com.keunsori.keunsoriserver.global.constant.EnvironmentConstant.DEV_URL; | ||
import static com.keunsori.keunsoriserver.global.constant.EnvironmentConstant.LOCAL_URL_1; | ||
import static com.keunsori.keunsoriserver.global.constant.EnvironmentConstant.LOCAL_URL_2; | ||
import static com.keunsori.keunsoriserver.global.constant.EnvironmentConstant.LOCAL_URL_3; | ||
import static com.keunsori.keunsoriserver.global.constant.EnvironmentConstant.PROD_URL; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class WebConfig implements WebMvcConfigurer { | ||
|
||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**") | ||
.allowedOrigins("*") | ||
//.allowedMethods("GET","POST","PUT","DELETE", "OPTIONS") | ||
.allowedMethods("*") | ||
//.allowedHeaders("Authorization", "Content-Type") | ||
.allowedHeaders("*") | ||
.exposedHeaders("Refresh-Token") | ||
//.allowCredentials("true")->도메인 정해지면 활성화 | ||
.maxAge(3600); | ||
} | ||
// @Override | ||
// public void addCorsMappings(CorsRegistry registry) { | ||
// registry.addMapping("/**") | ||
// .allowedOrigins(LOCAL_URL_1, LOCAL_URL_2, LOCAL_URL_3, DEV_URL, PROD_URL) | ||
// .allowedMethods("*") | ||
// .allowedHeaders("*") | ||
// .exposedHeaders("Refresh-Token") | ||
// .allowCredentials(true) | ||
// .maxAge(3600); | ||
// } | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/keunsori/keunsoriserver/global/constant/EnvironmentConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.keunsori.keunsoriserver.global.constant; | ||
|
||
public class EnvironmentConstant { | ||
|
||
public static final String LOCAL_URL_1 = "http://localhost:5173"; | ||
public static final String LOCAL_URL_2 = "http://localhost:5174"; | ||
public static final String LOCAL_URL_3 = "http://localhost:8080"; | ||
|
||
public static final String DEV_URL = "https://keun-develop.vercel.app"; | ||
|
||
public static final String PROD_URL = "https://keun-sori-web.vercel.app"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
INSERT INTO member (member_id, create_date, update_date, approval_date, hongikgmail, name, password, status, student_id) VALUES (1, '2025-01-24 17:13:21.229103', '2025-01-24 17:13:21.229103', null, '[email protected]', '권찬', '$2a$10$dwQMaJPc5PKzS6w4I8Wi..DAYEkOKb7PSoeF9gplcfDzMWcC2k2eq', '일반', 'C011013'); | ||
INSERT INTO member (member_id, create_date, update_date, approval_date, hongikgmail, name, password, status, student_id) VALUES (2, '2025-01-25 03:16:36.414396', '2025-01-25 03:16:36.414396', null, '[email protected]', '권찬', '$2a$10$ED7kelp/IBsvNtvHVv/CfeWtQN.vymhDfTPYD50jKYvmxXn5c87im', '일반', 'C011014'); | ||
INSERT INTO member (member_id, create_date, update_date, approval_date, hongikgmail, name, password, status, student_id) VALUES (3, '2025-01-25 13:31:43.977683', '2025-01-25 13:31:43.977683', null, '[email protected]', '관리자', '$2a$10$XyBz6shlUlVC7HiKckWHX.wsstjTy19Y239VuK.wuZXwdDLH4lDHy', '관리자', 'Z011000'); | ||
INSERT INTO member (member_id, create_date, update_date, approval_date, email, name, password, status, student_id) VALUES (1, '2025-01-24 17:13:21.229103', '2025-01-24 17:13:21.229103', null, '[email protected]', '권찬', '$2a$10$dwQMaJPc5PKzS6w4I8Wi..DAYEkOKb7PSoeF9gplcfDzMWcC2k2eq', '일반', 'C011013'); | ||
INSERT INTO member (member_id, create_date, update_date, approval_date, email, name, password, status, student_id) VALUES (2, '2025-01-25 03:16:36.414396', '2025-01-25 03:16:36.414396', null, '[email protected]', '권찬', '$2a$10$ED7kelp/IBsvNtvHVv/CfeWtQN.vymhDfTPYD50jKYvmxXn5c87im', '일반', 'C011014'); | ||
INSERT INTO member (member_id, create_date, update_date, approval_date, email, name, password, status, student_id) VALUES (3, '2025-01-25 13:31:43.977683', '2025-01-25 13:31:43.977683', null, '[email protected]', '관리자', '$2a$10$XyBz6shlUlVC7HiKckWHX.wsstjTy19Y239VuK.wuZXwdDLH4lDHy', '관리자', 'Z011000'); | ||
|
||
|
||
-- INSERT INTO reservation (reservation_id, reservation_date, reservation_end_time, reservation_type, reservation_session, reservation_start_time, member_id) VALUES (1, '2025-01-01', '22:00:00', 'PERSONAL', 'VOCAL', '21:00:00', 1); | ||
|