Aspectの設定は、s2aspectメソッドで行います。s2aspectメソッドの引数で、Interceptorを指定します。
require 's2container'
class Action
s2comp
s2aspect :interceptor => Seasar::Aop::Interceptor::TraceInterceptor.new
def index
s2logger.debug(self){"Action::index called."}
end
end
p s2app[Action].index
![]() | NOTE |
|---|---|
|
この例は example/quickstart/quickstart7 にあります。 |
| © Copyright The Seasar Foundation and the others 2008-2009, all rights reserved. |