新增restful模式

This commit is contained in:
六如
2025-02-04 12:12:41 +08:00
parent a2a438562b
commit f9a663d560
5 changed files with 26 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ public class DefaultWebContext extends WebContext implements Serializable {
private Locale locale;
private Map<String, String> headers;
private Map<String, String[]> paramtreMap;
private String realIp;
@Override
public String getParameter(String name) {

View File

@@ -58,6 +58,11 @@ public abstract class WebContext {
*/
public abstract Map<String, String> getHeaders();
/**
* 获取真实ip地址
*/
public abstract String getRealIp();
protected void setContext(WebContext openContext) {
THREAD_LOCAL.set(openContext);
}