org.zeroturnaround.javarebel.integration.spring.cbp.AbstractDetectingUrlHandlerMappingCBP Maven / Gradle / Ivy
package org.zeroturnaround.javarebel.integration.spring.cbp;
import org.zeroturnaround.bundled.javassist.CtNewMethod;
import org.zeroturnaround.bundled.javassist.CtMethod;
import org.zeroturnaround.bundled.javassist.ClassPool;
import org.zeroturnaround.bundled.javassist.CtClass;
import org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor;
public class AbstractDetectingUrlHandlerMappingCBP extends JavassistClassBytecodeProcessor {
public void process(ClassPool cp, ClassLoader cl, CtClass ctClass) throws Exception {
CtMethod m = CtNewMethod.make(
" protected Object lookupHandler(String urlPath, javax.servlet.http.HttpServletRequest request)\n" +
" throws Exception {\n" +
" detectHandlers();\n" +
" return super.lookupHandler(urlPath, request);\n" +
" }",
ctClass);
ctClass.addMethod(m);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy