1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| @Pointcut( value = "execution(* org.springframework.cloud.client.serviceregistry.ServiceRegistry+.register(..)) && args(registration)", argNames = "registration" ) private void pointcut(Registration registration) { }
@Before( value = "pointcut(registration)", argNames = "registration" ) private void beforeServiceRegister(Registration registration) { if (CollectionUtils.isNotEmpty(this.processors) && registration != null) { this.processors.forEach((each) -> { each.processing(@Pointcut( value = "execution(* org.springframework.cloud.client.serviceregistry.ServiceRegistry+.register(..)) && args(registration)", argNames = "registration" ) private void pointcut(Registration registration) { }
@Before( value = "pointcut(registration)", argNames = "registration" ) private void beforeServiceRegister(Registration registration) { Map<String, String> metaData= getMetadata(); mataData.put("1","2");
}); }); }
}
|