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

时间:2014-10-27 22:45:26   收藏:0   阅读:260

原文:

 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 {
    
    …
}
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!