开发者

How to get beforeActionInvocation and afterActionInvocation to be called in Play module?

I'm working on building my first Play module. 开发者_如何学GoI used another module as an example and created a Plugin.java class to serve as my main interface. I can access the methods on this class easily from my tags, but it seems that the object is not going through the normal lifecycle. Specifically, beforeActionInvocation() and afterActionInvocation() are never being called.

This module is more or less a stub right now, created via "play new-module" and I've not modified any of the default files (though I have added this class and some tags).

My question is: what causes a Plugin class to go through the normal plugin lifecycle, as it seems mine is not? Is there some configuration I'm missing?


You must have a subclass of PlayPlugin and a file play.plugins in your classpath, where you register it with

1003:myPackage.MyPlugin
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜