Define interceptors with struts2 annotations

I am trying to use struts2-convention-plugin which provides java annotations for defining struts2 components. The actions are so good so far, but how can I use annotations to identify interceptors? (I'm talking about @InterceptorRefs or @InterceptorRef ).

Is it possible? At the moment, I have configured actions with annotations and interceptors with the struts.xml file.

Is it possible to completely delete the struts.xml file and use a 100% annotation-oriented configuration?

+3
source share
1 answer

The struts2-convention plugin does not replace XWork and its xml-based configuration. Thus, you cannot eliminate the need for struts.xml if you use custom interceptors. For help and explanation of using the convention plugin, see docs .

+2
source

Source: https://habr.com/ru/post/1246065/


All Articles