fix:添加代码

This commit is contained in:
“袁杰” 2021-07-28 22:38:38 +08:00
parent b344245599
commit 44cb98c714
5 changed files with 12 additions and 6 deletions

View File

@ -13,7 +13,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* @since 2021-07-15 11:34
*/
@Slf4j
@MapperScan(basePackages = {"cn.axzo.oss.dal.mapper"})
@SpringBootApplication(scanBasePackages = {"cn.axzo.oss"})
@MapperScan(basePackages = {"cn.axzo.oss.dal.mapper"})
public class Bootstrap {

View File

@ -1,11 +1,16 @@
package cn.axzo.oss.client.config.resolver;
package cn.axzo.oss.client.annotation.resolver;
import cn.axzo.oss.client.config.ApiAccessCheck;
import cn.axzo.oss.common.annotation.ApiAccessCheck;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
/**
* @program: oss
@ -18,10 +23,11 @@ import org.springframework.stereotype.Component;
@Slf4j
public class ApiAccessCheckResolver {
@Around("@annotation(apiAccessCheck)")
public Object methodHandler(ProceedingJoinPoint jp, ApiAccessCheck apiAccessCheck)
throws Throwable {
Object[] params = jp.getArgs();
log.info("methodHandler params = {}", JSONObject.toJSON(params));
Object result = jp.proceed();
return result;
}

View File

@ -5,7 +5,6 @@ import cn.axzo.oss.http.model.ServerFileDeleteRequest;
import cn.axzo.oss.http.model.ServerFileUploadRequest;
import cn.axzo.oss.http.model.ServerFileUploadResponse;
import cn.azxo.framework.common.model.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

View File

@ -1,4 +1,4 @@
package cn.axzo.oss.client.config;
package cn.axzo.oss.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@ -17,4 +17,6 @@ public class ServerFileDeleteRequest {
@NotBlank(message = "url must not be null")
private String url;
private String appCode;
}