A new one. With regard to the cookie setting of SpringBoot, HttpServletResponse is passed through parameters, but why is it still null?

Control class:
package com.example.sso.controller;

import com.example.sso.damain.UserDemo;
import com.example.sso.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

@ Controller
public class UserController {

@Autowired
private LoginService loginService;

@RequestMapping(value = "/logincheck" , method = RequestMethod.POST)
public String login(HttpServletResponse httpServletResponse,
                    @RequestParam(value = "UserName",required = true) String UserName,
                    @RequestParam(value = "PassWord",required = true) String PassWord){
    System.out.println(httpServletResponse.getHeaderNames()+"hhhh");
    UserDemo userDemo = new UserDemo();
    userDemo.setUserName(UserName);
    userDemo.setPassWord(PassWord);
    if(loginService.login(userDemo,httpServletResponse).equals("SUCCESS")){
        return "UserOne";
    }
    return "login";
}
@RequestMapping(value = "/login",method = RequestMethod.GET)
public String tologin(){
    return "login";
}

}

service class:
package com.example.sso.service;

import com.example.sso.damain.UserDemo;
import org.springframework.stereotype.Service;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@ Service
public class LoginService {

private  static  final String UserName = "root";
private  static  final String PassWord = "123";
public String login(UserDemo user,HttpServletResponse response){
    if(user.getUserName().equals(UserName) && user.getPassWord().equals(PassWord)){
        Cookie cookie = new Cookie("ssocookie","sso");
        cookie.setPath("/");
        response = null;
        response.addCookie(cookie);
        return "SUCCESS";
    }
    return "FAIL";
}

}

Mar.26,2021
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-1b373db-4ece1.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-1b373db-4ece1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?