Seasar? †折角Service層のインタフェースを作るんだったら、 固定名で定義 †convention.dicon <component class="org.seasar.framework.convention.impl.NamingConventionImpl"> (略) <initMethod name="addInterfaceToImplementationClassName"> <arg>"com.test.service.HelloService"</arg> <arg>"com.test.service.mock.HelloServiceMock"</arg> </initMethod> </component> Suffixを変えてみる †convention.dicon <component class="org.seasar.framework.convention.impl.NamingConventionImpl"> (略) <property name="implementationSuffix"> "Mock" </property> </component> 多分今までが「Impl」だったところを「Mock」に変えるわけだから、 Serviceだけ違うNameConvention?を使う †creator.dicon <component class="org.seasar.framework.container.creator.ServiceCreator"> <arg> <component name="serviceNamingConvention" class="org.seasar.framework.convention.impl.NamingConventionImpl"> (略と同じ) <property name="implementationSuffix"> "Mock" </property> </component> </arg> </component> Serviceクラスだけ、Mockクラスのインスタンスが作られる、はず。 |