0
<jaxws:endpoint id="serviceEndpoint" implementor="#serviceImpl" address="/public/api/service/v1"" publishedEndpointUrl="#{serviceImpl.endpointUrl}"> </jaxws:endpoint>
<bean id="serviceImpl" class="com.services.ServiceProviderImpl" autowire="byType"> </bean>
我需要填充publishedEndpointUrl在我的實施者豆闖民宅的變量。 (ServiceProviderImpl)請讓我知道我能做到的方式。我推薦http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html。注射JAXWS:端點配置發佈URL
使它publishedEndpointUrl="#{serviceImpl}.publishedUrl"
不工作?
感謝
感謝您的輸入。我正在低於錯誤。 設置bean屬性'publishedEndpointUrl'時無法解析對bean {{serviceImpl.endpointUrl}'的引用;嵌套的異常是org.springframework.beans.factory.NoSuchBeanDefinitionException:沒有定義名爲'{serviceImpl.endpointUrl}'的bean –
我不熟悉[他們的xml解析器](http://grepcode.com/file/repo1.maven .org/maven2/org.apache.cxf/cxf-rt-frontend-jaxws/3.0.4/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java#EndpointDefinitionParser),但我沒有看到它解析該屬性。錯誤意味着它正在尋找一個bean而不是一個字符串。但是我在iPad上看起來不太適合看代碼。 –
但我仍然期望SpEL錯誤。你能顯示你的實際配置嗎?你有沒有放棄'#'? –