zoukankan      html  css  js  c++  java
  • spring boot aop 报错

    1、控制台报错

    Pointcut is not well-formed: expecting 'name pattern' at character position 33 execution(com.stu.controller.*.*(..))

    2、eclipse提示

    Pointcut is malformed: Pointcut is not well-formed: expecting 'name pattern' at character position 33 execution(com.stu.controller.*.*(..)) 

    上述两个错误是由路径配置不对造成的。

    本来目的是要拦截 controller 包下的所有类的方法,配置为 @Before("execution(com.stu.controller.*(..))")、@Before("execution(com.stu.controller.*.*(..))"),结果报错,改为@Before("execution(* com.stu.controller.*.*(..))")即可。

    “.*.*”,第一个“*”表示 controller 包下面的 controller 类,第二个“*”表示方法,所以第一次的配置不对,第二次的配置少了“*”,至于3个“*”中最前面的第一个“*”是什么意思,暂时还未明白。

    参考文章:https://blog.csdn.net/yangxiaovip/article/details/31797475

  • 相关阅读:
    计算机组成原理:“性能”是什么?
    试题 基础练习 Huffuman树
    最小堆的插入删除函数
    特殊函数
    进程控制
    进程的描述
    进程管理
    生成和配置Linux操作系统
    系统调用
    Shell脚本编程
  • 原文地址:https://www.cnblogs.com/jingyi17/p/10159085.html
Copyright © 2011-2022 走看看