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. 一、winForm-DataGridView操作——控件绑定事件的两种方法

    在winForm窗体中绑定(注册)事件的方法有两种: 一.绑定事件 双击控件,即进入.cs的代码编辑页面,会出现 类似于“ private void 控件名称_Click(object sender, ...

  2. BZOJ 1011--[HNOI2008]遥远的行星(乱搞)

    1011: [HNOI2008]遥远的行星 Time Limit: 10 Sec  Memory Limit: 162 MBSec  Special JudgeSubmit: 5684  Solved ...

  3. <转>(笔记)正则表达式的几种引擎

    这篇主要是基于<精通正则表达式>的一篇读书笔记,因为书还没看完,可能以后还会有相关的笔记.(工作以后看书的效率真的很低啊……) 正则引擎主要可以分为基本不同的两大类:一种是DFA(确定性有 ...

  4. joi库 学习笔记

    零.背景 node.js 应用中,req.query / req.body 传来的参数需要做 valication( 合法性验证 ) 一.安装 https://github.com/hapijs/jo ...

  5. Others - On Duty

    On Duty This is xxx and will be duty engineer in the next week. Thanks. Here is a kindly reminder. T ...

  6. Git - 信息查看

    git help git version # Display the version of git. git help # Prints the synopsis and a list of the ...

  7. Python小白学习之路(二十五)—【装饰器的应用】

    通过一个任务来加深对装饰器的理解和应用 回顾:装饰器的框架 def timmer(func): def wrapper(): func() return wrapper 任务:给以下正在运行的程序加一 ...

  8. redis集成相关工具类

    package cn.yiyuan.util; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; i ...

  9. docker部署consol 集群

    拉取镜像 docker pull consul 启动节点1 docker run -d -e 'CONSUL_LOCAL_CONFIG={"skip_leave_on_interrupt&q ...

  10. numpy.squeeze()的用法

    import numpy as np x = np.array([[[0], [1], [2]]]) print(x) """x= [[[0] [1] [2]]] &qu ...