The Dead Loop of unbinding Social accounts in spring social

read some online tutorials (tutorial address: https://juejin.im/post/5a7ae6.), spring social provides a ConnectController to bind and unbind

where the / connect/ {providerId} (DELETE request) sent by the front end can unbind the relevant binding

then says that such a view of connect/ {providerId} Connect will be returned after the request is called, but this view needs to be extended to implement

.

but I wrote it myself and found that I can indeed delete bindings in the database, but I will not jump to connect/ {providerId} Connect, but keep on looping. Finally, the front end returns ERR_TOO_MANY_REDIRECTS, to view the source code of ConnectController

    @RequestMapping(value="/{providerId}", method=RequestMethod.DELETE)
    public RedirectView removeConnections(@PathVariable String providerId, NativeWebRequest request) {
        ConnectionFactory<?> connectionFactory = connectionFactoryLocator.getConnectionFactory(providerId);
        preDisconnect(connectionFactory, request);
        connectionRepository.removeConnections(providerId);
        postDisconnect(connectionFactory, request);
        return connectionStatusRedirect(providerId, request);
    }

    protected RedirectView connectionStatusRedirect(String providerId, NativeWebRequest request) {
        HttpServletRequest servletRequest = request.getNativeRequest(HttpServletRequest.class);
        String path = "/connect/" + providerId + getPathExtension(servletRequest);
        if (prependServletPath(servletRequest)) {
            path = servletRequest.getServletPath() + path;
        }
        return new RedirectView(path, true);
    }

    private String getPathExtension(HttpServletRequest request) {
        String fileName = WebUtils.extractFullFilenameFromUrlPath(request.getRequestURI());        
        String extension = StringUtils.getFilenameExtension(fileName);
        return extension != null ? "." + extension : "";
    }

the above source code does not convert / connect/ {providerId} into connect/ {providerId} Connect. Won"t the final return connectionStatusRedirect (providerId, request) go back to removeConnections?

Aug.17,2021

you can't send an ajax request because it has been tested by yourself. You can just submit it in the form of form

.
<form action="/connect/github" method="POST">
    <input id="method" type="hidden" name="_method" value="delete"/>
    <button></button>
</form>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3abf5-2c252.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3abf5-2c252.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?