有人可以帮我解决我的问题吗?
我有以下错误:
测试错误:
testCreateNewCustomer(eu.ibacz.swsc.spring.di.testdependencyinjection.BankServiceTest): Cannot connect to Hessian remote service at [http://0.0.0.0:8080/SpringDemo-Server/remoting/NotifierService]; nested exception is com.caucho.hessian.client.HessianConnectionException: HessianProxy cannot connect to 'http://0.0.0.0:8080/SpringDemo-Server/remoting/NotifierService
testGetAllCustomers(eu.ibacz.swsc.spring.di.testdependencyinjection.BankServiceTest): Cannot connect to Hessian remote service at [http://0.0.0.0:8080/SpringDemo-Server/remoting/NotifierService]; nested exception is com.caucho.hessian.client.HessianConnectionException: HessianProxy cannot connect to 'http://0.0.0.0:8080/SpringDemo-Server/remoting/NotifierService
我不知道哪里有问题。
这是我的 applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-
aop-3.0.xsd">``
<import resource="spring-db-config.xml"/>
<aop:aspectj-autoproxy/>
<bean
class="org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor"/>
<bean id="jdbcTemplateDatasource" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="springJdbcCustomerDao"
class="eu.ibacz.swsc.spring.di.testdependencyinjection.dao.impl.JdbcTemplateCustomerDaoImpl">
<property name="jdbcTemplate" ref="jdbcTemplateDatasource"/>
</bean>
<bean id="bankService"
class="eu.ibacz.swsc.spring.di.testdependencyinjection.service.impl.BankServiceImpl">
<property name="customerDao" ref="springJdbcCustomerDao"/>
</bean>
<bean id="notifier" class="eu.ibacz.swsc.spring.commons.springdemocommons.SysOutNotifier" />
<bean
class="eu.ibacz.swsc.spring.di.testdependencyinjection.aspect.BankServiceLoggingAspect">
<property name="notifier" ref="remoteNotifier"/>
</bean>
<bean id="remoteNotifier" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
<property name="serviceUrl" value="${url.adress}" />
<property name="serviceInterface"
value="eu.ibacz.swsc.spring.commons.springdemocommons.Notifier"/>
</bean>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>urlconfig.properties</value>
</property>
</bean>
urlconfing.properties 看起来是这样的:
url.adress=http://0.0.0.0:8080/SpringDemo-Server/remoting/NotifierService
我已经使用命令提示符启动了 Jetty Server。
谢谢帮助