This appears to be a cross-domain problem, I appeared in the process of vue using axios to send a request directly to the java background
Then the code I solved in the backend is as follows plus the following code
@Configuration public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings (CorsRegistry registry) { // Set the path that allows cross-domain registration.addMapping (" / **" ) // Set the domain name that allows cross-domain requests.allowedOrigins ("* " ) // Whether certificates are allowed. AllowCredentials ( true ) .allowedMethods ( " * " ) .maxAge ( 3600 ); } ... }