class ShiroSecurityFilters {
def filters = {
all(uri: "/**") {
before = {
// Ignore direct views (e.g. the default main index page).
if (controllerName in ['foo', 'bar']) {
return true
}
// Access control by convention.
accessControl()
}
}
}
}
答案 0 :(得分:0)
您应该有权访问过滤器中的request
对象,并且可以调用request.getRemoteAddr()
来访问IP地址。