我有以下代码如何获取返回类型为int代替String
:
@Path("name")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String sayParam(@QueryParam("no1")int no1,@QueryParam("no2")int no2)
{
return (no1+no2)+" ";
}
答案 0 :(得分:0)
您应environments {
development {
dataSource {
username = "root"
password = "password"
logSql = true
dbCreate = "update"
url = "jdbc:mysql://localhost/my_project?useUnicode=yes&characterEncoding=UTF-8&autoReconnect=true"
}
}
}
使用no1+no2
:
int