Springboot aop section cannot be implemented.

springboot configure AOP unresponsive
springboot is version 2.1
this is my facet class

@Aspect
@Component
public class SignAop {

    @Autowired
    private SignService signService;

    @Before(value = "execution(* com.pyx.seller.controller.*.*(..)) && args(authId,sign,text,..)")
    public void verify(String authId,String sign,SignText text){
        String publicKey = signService.getPublicKey(authId);
        Assert.isTrue(RSAUtil.verify(text.toText(),sign,publicKey),"");
    }
}

this is my controller class

@RestController
@RequestMapping("/order")
@Slf4j
public class OrderController {
    @Autowired
    private OrderService orderService;

    @RequestMapping(value = "/apply", method = RequestMethod.POST)
    public Order apply(@RequestHeader String authId,@RequestHeader String sign, @RequestBody OrderParam param) {
        log.info(":{}", param);
        Order order = new Order();
        BeanUtils.copyProperties(param,order);
        order = orderService.apply(order);
        log.info(":{}", order);
        return order;
    }
}

this is my program entry

@SpringBootApplication
@EntityScan("com.pyx.entity")
@EnableSwagger2
@EnableCaching
public class SellerApp {
    public static void main(String[] args) {
        SpringApplication.run(SellerApp.class);
    }
}

I found that the section could not be performed at the end of the section, and the value value of @ Before was not valid.

Jun.20,2022

verify is the same as apply parameter. At least see that your args is required

.
Menu