liguofeng29’s blog

個人勉強用ブログだっす。

┗━S2AOP

S2AOP - 独自InterType

独自にInterTypeを作成する場合は、次のインターフェースまたは、抽象クラスを実装します。 org.seasar.framework.aop.InterType org.seasar.framework.aop.intertype.AbstractInterType 空クラスにメソッドを追加してみる。 app.dicon

S2AOP - InterType

InterTypeはクラスの静的な構造(フィールド追加、メソッド追加)を変更することができます。 S2AOPとして提供しているInterType - PropertyInterType a. フィールドに対するsetter,getterが追加できる。 b. <interType>タグを使う c. protected, publicフィールドであ</intertype>…

S2AOP - 独自Interceptor

独自にInterceptorを作成する場合は、次のインターフェースまたは、抽象クラスを実装します。 org.aopalliance.intercept.MethodInterceptor org.seasar.framework.aop.interceptors.AbstractInterceptor app.dicon

S2AOP - Interceptorのグループ化

InterceptorChainクラスを使い、Interceptorをクループ化する。 <component name="interceptor1" ... /> <component name="interceptor2" ... /> <component name="chain" class="org.seasar.framework.aop.interceptors.InterceptorChain"> <initMethod name="add"><arg>interceptor1</arg></initmethod></component></component></component>

S2AOP - 標準Interceptor

S2AOPとして提供するInterceptor. 予めaop.diconに登録してある。 クラス名コンポーネント名説明 TraceInterceptor aop.traceInterceptor トレースログ出力 ClassLoaderAwareTraceInterceptor aop.classLoaderAwareTraceIntercept…

S2AOPとは

AOPはAspect oriented Programming(アスペクト指向プログラミング)である。 なにができるを簡単を説明すると 複数のメソッドの前後同じ処理(ログ出力とか)を適用できる。 Seasar2ではS2AOPという、S2Containerで管理するコンポーネントに対してAOP適用する…