使用Spring启动配置我有例外
Caused by: java.net.MalformedURLException: no protocol: /CustomerService
如何将亲戚(对已部署的webapp)放入网址?
@Bean
public EndpointImpl endpoint(ICustomerService customerService) {
EndpointImpl endpoint = new EndpointImpl(cxfBus, new WCustomerService(customerService) );
endpoint.publish("/CustomerService");
return endpoint;
}
答案 0 :(得分:0)
看起来您需要将有效的URL作为字符串传递给发布,您可以在下面的函数中看到。它是EndpointImpl.java的片段。希望这会有所帮助。
public void More ...publish(String address) {
127 canPublish();
128 URL url;
129 try {
130 url = new URL(address);
131 } catch (MalformedURLException ex) {
132 throw new IllegalArgumentException("Cannot create URL for this address " + address);
133 }