1
回答
怎么进行JAVA接口添加功能的测试用url访问
开发十年,就只剩下这套Java开发体系了   
package com.kj.servlet;


import java.io.IOException;


import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import com.kj.dao.DownlinkDao;
import com.kj.view.Downlink;


public class DownlinkServlet extends HttpServlet {


public DownlinkServlet() {
super();
}


public void destroy() {
super.destroy();
}


public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
String phone = request.getParameter("phone");
String moid = request.getParameter("moid");
String msg = request.getParameter("msg");
String productid = request.getParameter("productid");
Downlink user = new Downlink(phone,moid,msg,productid);
new DownlinkDao().addDownlink(user);

}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {


}


public void init() throws ServletException {
}


}
这个是代码 数据入库 怎么写测试类 测试这个接口阿
举报
顶部