forked from pzk9h3i5c/c7-523
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
538 B
19 lines
538 B
package com.qsd.orange.exception;
|
|
|
|
import com.qsd.orange.global.HttpResult;
|
|
import com.qsd.orange.global.R;
|
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
|
|
|
@ControllerAdvice
|
|
public class LoginException {
|
|
|
|
@ExceptionHandler(UsernameNotFoundException.class)
|
|
public R usernameNotFoundException(){
|
|
return R.error(HttpResult.USERNAME_OR_PASSWORD_ERROR);
|
|
}
|
|
|
|
}
|