[英]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.