I am trying to set a method Hook to KafkaListenerContainerFactory.KafkaListenerContainerFactory() I am having problems defining the method signature and always get the error: java.lang.IllegalArgumentException: None of [private static net.bytebuddy.dynamic.DynamicType$Builder com.bionicstork.analysis.hooks.KafkaListenerAnnotationBeanPostProcessorHook.lambda$install$0(net.bytebuddy.dynamic.DynamicType$Builder,net.bytebuddy.description.type.TypeDescription,java.lang.ClassLoader,net.bytebuddy.utility.JavaModule), public static java.lang.Object com.bionicstork.analysis.hooks.KafkaListenerAnnotationBeanPostProcessorHook.createListenerContainer(java.lang.Object,java.util.concurrent.Callable) throws java.lang.Exception, INSTANCE] allows for delegation from public abstract org.springframework.kafka.listener.MessageListenerContainer org.springframework.kafka.config.KafkaListenerContainerFactory.createListenerContainer(org.springframework.kafka.config.KafkaListenerEndpoint) My code is: Answer The method in question returns a MessageListenerContainer, not a smart life
Tag: byte-buddy
Is there any way to call advice() on a loaded class’s methods before the ByteBuddy agent?
I have implemented a simple agent as below. It works for my custom Foo.class, but I couldn’t assign advice for the java.net.URL class. Example test code; Is there any specific approach to binding advice’s java.net.URL class methods so that the class is loaded before the ByteBuddy agent? Answer Rafael is right, as usual. I want to elaborate on your question