warning no match for this type name:xxx.xxx.xxx [Xlint:invalidAbsoluteTypeName]
問題:warning no match for this type name:xxx.xxx.xxx [Xlint:invalidAbsoluteTypeName]
原因:配置切面表示式有誤
execution(<修飾符模式>? <返回型別模式> <方法名模式>(<引數模式>) <異常模式>?) 除了返回型別模式、方法名模式和引數模式外,其它項都是可選的。
如:execution(* com.idea4j.apollo.demo.service.*.*(..))
execution表示攔截方法,第一個“*”表示方法的返回值是任意的,第二個“*”包下的所有類,第三個“*”任意方法,(..)表示方法的引數是任意的
常見的切面表示式
1 所有公有方法的執行
execution(public * *(..))
2 所有以set開頭的公有方法的執行
execution(* set*(..))
3 AccountService介面下的所有方法的執行
execution(* com.xyz.service.AccountService.*(..))
4 com.xyz.service包下的所有方法的執行
execution(* com.xyz.service.*.*(..))
5 com.xyz.service包及其子包下的所有方法的執行
execution(* com.xyz.service..*.*(..))
6 匹配com.xyz.service包下的所有類的所有方法(不含子包)
within(com.xyz.service.*)
7 com.xyz.service包和子包的所有方法
within(com.xyz.service..*)
8 匹配AccountService的代理類(不支援萬用字元)
this(com.xyz.service.AccountService)
官方文件
https://docs.spring.io/spring/docs/4.2.5.RELEASE/spring-framework-reference/htm