mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-18 07:16:50 +08:00
添加日志
This commit is contained in:
@@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -99,7 +100,8 @@ public class CourseWareApi extends ApiBaseController {
|
||||
* @throws Exception
|
||||
*/
|
||||
@GetMapping("/resource")
|
||||
public JsonResponse<String> getVideo(HttpServletRequest request, HttpServletResponse response, String sign) throws Exception {
|
||||
public JsonResponse<String> getVideo(HttpServletRequest request, HttpServletResponse response, String sign,
|
||||
@CookieValue(name = "token",required = false)String token) throws Exception {
|
||||
|
||||
if (StringUtils.isBlank(sign)) {
|
||||
return badRequest("非法请求");
|
||||
@@ -119,10 +121,10 @@ public class CourseWareApi extends ApiBaseController {
|
||||
if(!has) {
|
||||
return badRequest("页面不存在");
|
||||
}
|
||||
String token = request.getHeader("Xboe-Access-Token");
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
token = request.getHeader("token");
|
||||
}
|
||||
// String token = request.getHeader("Xboe-Access-Token");
|
||||
// if (StringUtils.isEmpty(token)) {
|
||||
// token = request.getHeader("token");
|
||||
// }
|
||||
// 读取cookies中的时间
|
||||
// String cookieTime = getSignTimeCookie(request);
|
||||
// if (StringUtils.isBlank(cookieTime)) {
|
||||
|
||||
Reference in New Issue
Block a user