You can override any vraptor3 component. DefaultRequestExecution too. Vraptor scan all classes avaliable in you classes and check if has the annotation @Component and override with satisfy the dependency.
You can do this code bellow. I was implements the interface RequestExecution to change execution proccess. As you see I comment the MultipartInterceptor and create a customized ExecuteMethodInterceptor.
[code]@Component @RequestScoped
public class CustomRequestExecution
implements RequestExecution {
private final InterceptorStack interceptorStack;
private final InstantiateInterceptor instantiator;
you can implement your class like garcia-jj said, but eventually you will get a NullPointerException when forwarding to a page that doesn’t exist.
It is a bug, that is already fixed, but this fix was not released yet. When the new version (3.0.3) is available, you must change @RequestScoped to @PrototypeScoped.
@garcia-jj
a prototype scope component is instantiated every time it is needed… No two components share the same instance of a prototype scoped component.