[英]Grails 2.4 transitive plugin dependencies don't respect the 'exclude' directive
[英]Grails 2.4 filters don't seem to be working
我有一个Grails 2.4.4应用程序。 在其中我有以下控制器:
myapp/
grails-app/
controllers/
fizzbuzz/
FizzController.groovy
BuzzController.groovy
... many others, etc.
我想为其中一些创建Grails过滤器 ,所以我创建了一个grails-app/conf/WidgetFilters.groovy
类:
class WidgetFilters {
def filters = {
fizzFilter(controller: 'fizz*', action: '*') {
before = {
println 'I intercepted a called to the Fizz Controller!'
}
}
buzzFilter(controller: 'buzz*', action: '*') {
before = {
println 'I intercepted a called to the Buzz Controller!'
}
}
}
}
当我启动我的应用程序并进行任何Fizz / Buzz操作时,我看不到println
。 我还尝试了其他日志语句(SLF4J)并将其他代码置于关闭before
并且100%确信它们没有执行。 我做过一些明显错误的事吗?
将课程移至grails-app/conf
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.