2.7. Auto Aspect

A setup of Aspect is performed by the s2aspect method. Interceptor is specified by the argument of the s2aspect method.

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]NOTE

This Example is located at "examples/quickstart/quickstart7".



© Copyright The Seasar Foundation and the others 2008-2009, all rights reserved.