• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

UserNotFoundException 은 UsernameNotFoundException이 맞나요?

22.11.02 21:13 작성 조회수 290

0

안녕하세요.

PPT 설명으로 표현된 UserNotFoundException이 찾아보니 UsernameNotFoundException 인 것 같습니다. 오타인가요? 아니면 버전이 바뀌면서 이름이 바뀐걸까요?

package org.springframework.security.core.userdetails;

import org.springframework.security.core.AuthenticationException;

/**
 * Thrown if an {@link UserDetailsService} implementation cannot locate a {@link User} by
 * its username.
 *
 * @author Ben Alex
 */
public class UsernameNotFoundException extends AuthenticationException {

   /**
    * Constructs a <code>UsernameNotFoundException</code> with the specified message.
    * @param msg the detail message.
    */
   public UsernameNotFoundException(String msg) {
      super(msg);
   }

   /**
    * Constructs a {@code UsernameNotFoundException} with the specified message and root
    * cause.
    * @param msg the detail message.
    * @param cause root cause
    */
   public UsernameNotFoundException(String msg, Throwable cause) {
      super(msg, cause);
   }

}

 

답변 1

답변을 작성해보세요.

0

아 네

오타가 맞습니다.

UsernameNotFoundException

가 정확한 클래스 명입니다.