📄 surveyservice.java
字号:
package ws.cxf.impl;
import javax.jws.WebService;
import ws.cxf.ISurveyService;
@WebService
public class SurveyService implements ISurveyService
{
private String excludeName = "Michael";
private int leastPonit = 5;
public String vote(String username,int point)
{
String result = "";
if(excludeName.equals(username))
{
result = "你不能重复进行投票!";
}
else
{
result = "谢谢你的投票!";
if(point < leastPonit)
{
result += "你的投票分数太低!";
}
else
{
result += "你的投票分数通过审核!";
}
}
return result;
}
// For IoC
public String getExcludeName()
{
return excludeName;
}
public void setExcludeName(String excludeName)
{
this.excludeName = excludeName;
}
public int getLeastPonit()
{
return leastPonit;
}
public void setLeastPonit(int leastPonit)
{
this.leastPonit = leastPonit;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -