diff --git a/src/main/java/io/github/depromeet/knockknockbackend/domain/user/domain/repository/UserRepository.java b/src/main/java/io/github/depromeet/knockknockbackend/domain/user/domain/repository/UserRepository.java index 958d242e..24da10d3 100644 --- a/src/main/java/io/github/depromeet/knockknockbackend/domain/user/domain/repository/UserRepository.java +++ b/src/main/java/io/github/depromeet/knockknockbackend/domain/user/domain/repository/UserRepository.java @@ -8,7 +8,7 @@ public interface UserRepository extends CrudRepository { - List findByNicknameLike(String nickname); + List findByNicknameContaining(String nickname); Optional findByOauthIdAndOauthProvider(String oauthId, String oauthProvider); diff --git a/src/main/java/io/github/depromeet/knockknockbackend/domain/user/service/UserService.java b/src/main/java/io/github/depromeet/knockknockbackend/domain/user/service/UserService.java index 9fe46e99..02574e58 100644 --- a/src/main/java/io/github/depromeet/knockknockbackend/domain/user/service/UserService.java +++ b/src/main/java/io/github/depromeet/knockknockbackend/domain/user/service/UserService.java @@ -27,7 +27,7 @@ public class UserService { public QueryUserByNicknameResponse queryUserByNicknameResponse(String nickname) { List result = - userRepository.findByNicknameLike(nickname).stream() + userRepository.findByNicknameContaining(nickname).stream() .map( user -> new QueryUserByNicknameResponseElement(