问题:IllegalArgumentException: error wildcard type pattern not allowed, must use type name****
执行test时,使用@Before("execution(* com.imooc.aop.aspectj.biz.*Biz.*(..))")可以成功测试,配置@Before("pointcut()"),出现IllegalArgumentException: error wildcard type pattern not allowed, must use type name at***错误,求解答
代码如下:
//MoocAspect类
@Component
@Aspect
public class MoocAspect
{
	// 定义两个切入点
	// 匹配方法执行的切入点
	@Pointcut("execution(* com.imooc.aop.aspectj.biz.*Biz.*(..))")
	public void pointcut()
	{
	};
	// 限定匹配特定类型的连接点
	@Pointcut("with(com.imooc.aop.aspectj.biz.*)")
	public void biaPointcut()
	{
	};
	// before advice
	// 方法一
	// @Before("execution(* com.imooc.aop.aspectj.biz.*Biz.*(..))")
	@Before("pointcut()")
	public void before()
	{
		System.out.println("Before.");
	}
}
 
                            