Commit 51c3c18a by 仲光辉

切入点表达式修正:包扫描 2020/10/20 10:51

parent 73c8f640
......@@ -44,7 +44,7 @@ public class RequestLogAspect {
/**
* 切入点表达式
*/
@Pointcut("@within(cn.dankal.test.common.service.aspect.DoRequestLog)")
@Pointcut("execution(public * cn.dankal.test..controller..*(..))")
public void pointcut() {
}
......
......@@ -2,7 +2,6 @@ package cn.dankal.test.user.controller;
import cn.dankal.test.client.order.OrderServiceClient;
import cn.dankal.test.common.domain.Person;
import cn.dankal.test.common.service.aspect.DoRequestLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -21,7 +20,6 @@ import java.time.format.DateTimeFormatter;
* @create 2020/10/18
*/
@Slf4j
@DoRequestLog
@RestController
@RequestMapping("/user")
public class UserController {
......
......@@ -2,7 +2,6 @@ package cn.dankal.test.user.controller;
import cn.dankal.test.client.order.OrderServiceClient;
import cn.dankal.test.common.domain.Person;
import cn.dankal.test.common.service.aspect.DoRequestLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -21,7 +20,6 @@ import java.time.format.DateTimeFormatter;
* @create 2020/10/18
*/
@Slf4j
@DoRequestLog
@RestController
@RequestMapping("/user")
public class UserController {
......
package cn.dankal.test.order.controller;
import cn.dankal.test.common.service.aspect.DoRequestLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -19,7 +18,6 @@ import java.util.UUID;
* @create 2020/10/18
*/
@Slf4j
@DoRequestLog
@RestController
@RequestMapping("/order")
public class OrderController {
......
package cn.dankal.test.order.controller;
import cn.dankal.test.common.service.aspect.DoRequestLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -19,7 +18,6 @@ import java.util.UUID;
* @create 2020/10/18
*/
@Slf4j
@DoRequestLog
@RestController
@RequestMapping("/order")
public class OrderController {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment