誰能幫忙解釋一下,這里為什么加@Component 注解???
@Aspect @Component ?//誰能幫忙解釋一下,這里為什么加@Component 注解??? public class HttpAspect { ? ?@Before("execution(public * com.imooc.controller.GirlController.*(..))") ? ?public void log(){ ? ?System.out.println("log-log-log-log"); ? ?} }
2017-09-11
因為要掃描這個類,又因為沒有對應(yīng)的注解,只能用這個可以說是萬能的@Component注解吧,更詳細(xì)的可以去找度娘