Every time springboot gets session, it's different.

the springboot project takes the session, and stuffs something into it.
Why is there nothing in the attribute in the session I get every time?
Code:

@ RestController
public class Controller {

public void a(HttpSession session) throws InterruptedException {
    Object obj = session.getAttribute("asasa");
    if (obj==null) {
        session.setAttribute("asasa","121212");
    }



}

}

it"s so depressing.

Jul.19,2021

when processing cross-domain requests:

@Configuration
public class MyConfigration implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("*")
                .allowedMethods("GET", "HEAD", "POST","PUT", "DELETE", "OPTIONS")
                .allowCredentials(true) //true
                .maxAge(3600);;
    }
}

when sending a request:

vue project settings: axios.defaults.withCredentials = true

Jquery project settings:

  

whether the front-end AJAX framework uses fetch? Fetch makes requests without jsessionId by default, so it will cause session invalidation.

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-1b398b7-2b91d.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-1b398b7-2b91d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?