spring security disable login code example
Example: spring security auto login after register
public void authWithHttpServletRequest(HttpServletRequest request, String username, String password) {
try {
request.login(username, password);
} catch (ServletException e) {
LOGGER.error("Error while login ", e);
}
}