我正在使用 Spring 并尝试访问 HTTP 调用程序远程服务,并在 spring-http-client-config.xml 中指定了 url。但我得到以下异常
org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://blr1272d:8080/MaskOracle/remoting/securityService]; nested exception is java.io.IOException: Did not receive successful HTTP response: status code = 401, status message = [Unauthorized]
我在 spring-http-client-config.xml 中指定的配置详细信息如下
<bean id="securityService"
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl" value="http://blr1272d:8080/MaskOracle/remoting/securityService" />
<property name="serviceInterface" value="com.him.mask.security.remote.service.SecurityService" />
<property name="httpInvokerRequestExecutor" ref="httpInvokerRequestExecuter"/>
</bean>
<bean id="httpInvokerRequestExecuter"
class="org.springframework.security.remoting.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor" />
我不知道为什么我会得到这个例外。请帮助我解决问题。谢谢