인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

Timo's profile image
Timo

asked

Spring Security

8) Authentication Handler - AuthenticationProvider

UserNotFoundException 은 UsernameNotFoundException이 맞나요?

Written on

·

416

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);
   }

}

 

Spring Securityspring-bootjava

Answer 1

0

leaven님의 프로필 이미지
leaven
Instructor

아 네

오타가 맞습니다.

UsernameNotFoundException

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

Timo's profile image
Timo

asked

Ask a question