0
I가 서버에 HTTP 게시를 만들려고 노력하고 있는데이 코드 줄에서 java.net.UnknownHostException을 얻고을 생성/소비java.net.UnknownHostException : HTTP : // localhost를 : 8082/
Socket socket = new Socket(REST_SERVICE_URI, 8082);
이
@RequestMapping(value="AddService",method = RequestMethod.POST)
@ResponseBody
public void addService(@ModelAttribute("servDetForm") xxxx tb) throws IOException{
//return dataServices.addService(tb);
Socket socket = new Socket(REST_SERVICE_URI, 8082);
String request = "GET/HTTP/1.0\r\n\r\n";
OutputStream os = socket.getOutputStream();
os.write(request.getBytes());
os.flush();
InputStream is = socket.getInputStream();
int ch;
while((ch=is.read())!= -1)
System.out.print((char)ch);
socket.close();
}
어디에 내 잘못 해주십시오 요청을 수신 컨트롤러는 무엇입니까?