I encountered two problems when using spring security:
- if the login authentication callback needs to output json, it can only be output through response.getWriter (). Write ().
- if the business code is written in the login authentication callback, because all the processing is done in Filter, the business exception cannot be caught through the controller enhancer (@ RestControllerAdvice), and the exception handling requires additional coding.
after searching the information, I didn"t find any useful information. Do you have any other ways to achieve it?