在登录系统的 controller中 将 为了更新头像
修改 nginx配置 后的 接受的文件、 token
进行传递 到 userInfoController
userInfoController 具体功能 在前面写过
import com.tanhua.sso.vo.ErrorResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@RestController
@RequestMapping("users")
public class MyCenterController {
@Autowired
private UserInfoController userInfoController;
/**
* 上传头像
*
* @param file
* @param token
* @return
*/
@PostMapping("header")
public ResponseEntity
return this.userInfoController.saveUserLogo(file, token);
}
}
| 留言与评论(共有 0 条评论) “” |