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