服务器和交付 url 用于接收 http post 请求

server and delivery url for receiving http post request

我的系统需要与第三方系统交互以接收一些警报信息。

我需要设置一个交付 url 并构建一个接收器网络应用程序,它将侦听来自第三方系统的 http POST 请求,该请求将在 JSON 中包含此警报信息格式。

我的系统基于Java。根据我的理解,我需要设置一个 url 像 http://www.myexample.com:1111 which will be be a Java server program listening at a particular port number. But the example the third party has provided for the delivery url is of the format http://www.myexample.com:1111/testapp.

该领域的专家能否指导我如何针对这一特定需求开发服务器以及如何决定我需要向第三方提供的交付方式url?

我已经有一个 Java Struts2 Web 应用程序 运行 在 Apache Tomcat 上 url http://www.myexample.com:8080

看看THIS 简单的指南。您只需要一个 REST 方法 (GET),因此您应该在 GreetingController class 中的 @RequestMapping 注释中添加更多细节,例如:

@RequestMapping (value = "/greeting", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) 这可行。