怎么把网站关掉,免费跨境电商平台入驻,利用小程序反向做网站,东莞公司注册地址查询war文件名是forms.war。 web.xml中的url模式为/控制器操作的RequestMapping为/如果遇到localhost#xff1a;8080 /表单#xff0c;则RequestMethod.GET操作正常工作如果针对localhost:8080/forms点击发布数据#xff0c;则不会触发RequestMethod.P…war文件名是forms.war。 web.xml中的url模式为/控制器操作的RequestMapping为/如果遇到localhost8080 /表单则RequestMethod.GET操作正常工作如果针对localhost:8080/forms点击发布数据则不会触发RequestMethod.POST操作POST请求提供302重定向当我点击localhost:8080/forms/时POST请求正常工作醇任何使POST请求工作而不尾随斜杠的解决方案以下是我用来测试POST api的代码public class HttpPostExample {public static void main(String[] args) {HttpClient httpClient HttpClientBuilder.create().build();try {HttpPost request new HttpPost(http://localhost:8080/forms);StringEntity params new StringEntity({\form_url\:\admin\,\website\:\US_WEBSITE\,\email\:\testelascrip1gmail.com\,\cis_name\:\testscrip1\} );request.addHeader(content-type, application/x-www-form-urlencoded);request.setEntity(params);HttpResponse response httpClient.execute(request);System.out.println(Printing the response code response.getStatusLine().getStatusCode());} catch (IOException e) {e.printStackTrace();}}}将URL更改为/ forms /适用于POST请求但不适用于/ forms