更新头像功能 定义 修改 nginx后的 controller



在登录系统的 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 saveLogo(@RequestParam("headPhoto") MultipartFile file, @RequestHeader("Authorization") String token) {

return this.userInfoController.saveUserLogo(file, token);

}

}

发表评论
留言与评论(共有 0 条评论) “”
   
验证码:

相关文章

推荐文章