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

spring boot aop 报错的更多相关文章

  1. spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

    spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web serv ...

  2. Spring boot 启动报错 Failed to auto-configure a DataSource

    1.Spring boot 启动报错 Failed to auto-configure a DataSource 参考资料https://blog.csdn.net/liuyinfei_java/ar ...

  3. 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...

  4. 【原创】大叔经验分享(67)spring boot启动报错

    spring boot 启动报错: Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback Logg ...

  5. spring boot 启动报错(spring-boot-devtools热部署后):The elements [spring.resources.cache-period] were left unbound. Update your application's configuration

    详细错误代码: *************************** APPLICATION FAILED TO START *************************** Descript ...

  6. [Java]Java 9运行Spring Boot项目报错的解决办法

    简介 为了学习和尽快掌握 Java 9 的模块化(Module System)新特性,最近安装了 JDK 9,新建了一个 Spring Boot 进行尝试, 过程中遇到了一下报错问题,写下此文谨作为个 ...

  7. Spring Boot 启动报错 Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37

    使用命令 java -jar springBoot.jar  启动项目,结果报错如下: Exception at java.lang.String.substring(String.java:) at ...

  8. spring boot启动报错Error starting ApplicationContext(未能配置数据源)

    主要错误:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource c ...

  9. spring boot 打包报错

    [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.0.RELEASE:repac ...

随机推荐

  1. Java基础巩固计划

    3.26-4.1 JVM 虚拟机的内容写五篇博客 解决以下问题: 1. Java的内存模型以及GC算法 2. jvm性能调优都做了什么 3. 介绍JVM中7个区域,然后把每个区域可能造成内存的溢出的情 ...

  2. Ubuntu修改apt-get源

    1.背景 服务器上安装了最新的Ubuntu Server 17.04,代号为zesty.使用apt-get命令安装软件时,有时候速度比较慢,有时候会失败.因此考虑用国内的镜像源更换下apt-get的默 ...

  3. 微信小程序如何跳转到另一个小程序

    微信小程序如何跳转到另一个小程序,要注意:在app.json文件里也要配置 navigateToMiniProgramAppIdList,如下图: "navigateToMiniProgra ...

  4. 读取excel合并单元格内容

    def get_excel_content(excel_path): contents = [] if self.log_path.endswith('xls'): workbook = xlrd.o ...

  5. 【xsy1130】tree 树形dp+期望dp

    题目写得不清不楚的... 题目大意:给你一棵$n$个节点的树,你会随机选择其中一个点作为根,随后随机每个点深度遍历其孩子的顺序. 下面给你一个点集$S$,问你遍历完$S$中所有点的期望时间,点集S中的 ...

  6. info.plist的选项含义

    1.     Application does not run in background(鍵名:UIApplicationExistsOnSuspend)自從iOS4.0之後,當你在應用程式執行的時 ...

  7. SQL 复习笔记 MSSQL篇

    苦逼得很,一下就失业了,只有好好复习,迎接下一份工作 MSSQL篇:     1.数据库表分为临时表和永久表.临时表又分为全局临时表和局部临时表         全局临时表:表名以##开头.对系统当前 ...

  8. Metasploit中数据库的密码查看以及使用pgadmin远程连接数据库

    我们都知道,在msf下进行渗透测试工作的时候,可以将结果数据保存到数据库中,方便各个小组成员在渗透测试过程中的数据同步. 例如,Metasploit提供了db_nmap命令,它能够将Nmap扫描结果直 ...

  9. mysql基础知识(3)

    十六.组合查询 使用 union 来组合查询,如果第一个查询返回M行,第二个查询返回N行,那么组合查询的结果一般为 M+N 行. 注意:每个查询必须包含相同的行.表达式的聚集函数:默认会去除相同行.表 ...

  10. j2ee高级开发技术课程第三周

    一.分析Filter例子(轻量级javaee企业应用实战p132) // 执行过滤的核心方法 public void doFilter(ServletRequest request, ServletR ...