リモートインターフェイスをSpringWebアプリケーションに公開しようとしていますが、問題が発生し、常に404が発生します。以下のセットアップの何が問題になっていますか?
Grails:
サービス-パッケージmypackage
class RemoteUserService implements RemoteUserServiceInterface {
static expose = ['httpinvoker']
User findUser(String userId) {
return User.findByUserId(userId);
}
}
src / groovy / mypackage
class RemoteUserService implements RemoteUserServiceInterface {
static expose = ['httpinvoker']
User findUser(String userId) {
return User.findByUserId(userId);
}
}
春:
mypackage
public class MyController extends AbstractController {
RemoteUserServiceInterface remoteUserService
}
appContext
<bean id="viewController" class="mypackage.MyController">
<property name="remoteUserService" ref="remoteUserService"/>
</bean>
<bean id="remoteUserService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl" value="http://localhost:8080/grails-app-name/httpinvoker/RemoteUserService"/>
<property name="serviceInterface" value="mypackage.RemoteUserServiceInterface"/>
</bean>