Skip to content

Commit

Permalink
Merge branch 'shinhee'
Browse files Browse the repository at this point in the history
  • Loading branch information
shinheekim committed Jul 23, 2024
2 parents bbd92fe + 86f6e05 commit d9c1683
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.logout(AbstractHttpConfigurer::disable)
.httpBasic(AbstractHttpConfigurer::disable)
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
.requestMatchers(HttpMethod.POST, "/users/**").permitAll() // ๋ชจ๋“  ์‚ฌ์šฉ์ž ํšŒ์›๊ฐ€์ž… ์—”๋“œํฌ์ธํŠธ ํ—ˆ์šฉ
.requestMatchers(HttpMethod.POST, "/users/**").permitAll()
.anyRequest().authenticated()
)
.addFilterBefore(jwtAuthorizationFilter, UsernamePasswordAuthenticationFilter.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import jakarta.validation.constraints.NotBlank;

public record UserLoginReqDto(
@NotBlank
@NotBlank(message = "์•„์ด๋””๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”")
String loginId,
@NotBlank
@NotBlank(message = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”")
String password
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import jakarta.validation.constraints.NotBlank;

public record UserSaveReqDto(
@NotBlank
@NotBlank(message = "์•„์ด๋””๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”")
String loginId,
@NotBlank
@NotBlank(message = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”")
String password,
@NotBlank
@NotBlank(message = "๋‹‰๋„ค์ž„์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”")
String nickname
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class UserService {
@Transactional
public void join(UserSaveReqDto userSaveReqDto) {
if (userRepository.existsByLoginId(userSaveReqDto.loginId())) {
throw new InvalidUserException("์ด๋ฏธ ์กด์žฌํ•˜๋Š” ์•„์ด๋””์ž…๋‹ˆ๋‹ค."); // incaalidUserException
throw new InvalidUserException("์ด๋ฏธ ์กด์žฌํ•˜๋Š” ์•„์ด๋””์ž…๋‹ˆ๋‹ค.");
}
User user = User.builder()
.loginId(userSaveReqDto.loginId())
Expand Down

0 comments on commit d9c1683

Please sign in to comment.