目录:\src\com\api\formmode\web\CustomWanziTestFormmodeAction.java
编译为class后\src\com\api\formmode\web\CustomWanziTestFormmodeAction.class
(需重启服务器)
请求地址:/api/formmode/custom/wanzitestaction/test?param1=111
返回内容:
{
    "message": "This is a test response from the custom wanzitestaction formmode action.",
    "param1": "111"
}package com.api.formmode.web;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
@Path("/formmode/custom/wanzitestaction")
public class CustomWanziTestFormmodeAction {
    public CustomWanziTestFormmodeAction() {
    }
    @POST
    @Path("/test")
    @Produces({"application/json"})
    public String testFormmode(@Context HttpServletRequest request, @Context HttpServletResponse response) {
        response.setContentType("application/json; charset=utf-8");
        String param1 = request.getParameter("param1");
        JSONObject result = new JSONObject();
        result.put("param1", param1);
        result.put("message", "This is a test response from the custom wanzitestaction formmode action.");
        return result.toJSONString();
    }
}[EcologyEC9] 记Ecology如何简单写restful接口? by https://oneszhang.com/archives/76.html
楼主 您好,您是用什么工具部署E9环境的开发得的能,能否出一个教程 感谢
https://e-cloudstore.com/doc.html?appId=c6a9ae6e47b74d4da04c935ed51d177a&maxImgWidth=800
我是用的这个官方教程,你也可以从导航站 huahan.cc 看到相关内容。