📄 jaxrpchelloworld.java
字号:
package com.test.webservice;
import javax.xml.rpc.ServiceException;
import org.springframework.remoting.jaxrpc.ServletEndpointSupport;
import com.test.IHelloWorld;
public class JaxRpcHelloWorld extends ServletEndpointSupport implements IHelloWorld
{
private IHelloWorld helloWorld;
protected void onInit() throws ServiceException {
//在Spring容器中获取Bean的实例
helloWorld = (IHelloWorld) getApplicationContext().getBean(
"helloWorld");
}
public String getMessage(String name) {
//执行Bean中的相同的方法
return helloWorld.getMessage(name);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -