我有使用@PUT
,@POST
注释的方法。如果没有这些注释,这些方法运行良好。那么这些注解有什么用呢?
@GET
@Path ("/{stockId}")
@Produces("application/xml")
public StockDetail search(@PathParam("stockId") Integer stockId) {
final String methodName="search";
mLogger.debug(mClassName+"::" +methodName+"::Entered");
StockDetail stockDetails=null;
try {
stockDetails = mStockBean.retrieve(stockId);
} catch(Exception exception) {
mLogger.error("ClassName::" +mClassName+ "MethodName::" +methodName+"Error::"+exception.getMessage());
}
return stockDetails;
}