原文:
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 {
…
}
时间: 2024-10-23 02:13:27