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.
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.
Regardds
G
garcia-jj
Lucas, what’s the prototype scope?
Regards
H
haiker
thank you all for your warmhearted help~
is there any English documents about VRaptor3!
I’m a Chinese, so I can only understand English as a foreign language.
but I still very pleased every question I asked have been replied.
@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.