play的过滤类怎么实现继承问题

原文:

 Example:


public class Secure extends Controller {
    
    @Before
    static void checkAuthenticated() {
        if(!session.containsKey("user")) {
            unAuthorized();
        }
    }
}    
And on another Controller:

@With(Secure.class)
public class Admin extends Controller {
    
    …
}
posted @ 2014-10-27 21:51  lycan785  阅读(146)  评论(0编辑  收藏  举报