Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:APIJSON APIJSON Demo DemoController BigData

From Leeroopedia
Knowledge Sources
Domains Web_Framework, API_Design, Routing
Last Updated 2026-10-14 00:00 GMT

Overview

Concrete tool for routing HTTP requests to generic CRUD operations in the APIJSON BigData server variant, extending the base DemoController with BigData-specific endpoints.

Description

The DemoController class (BigData variant) is a Spring @RestController extending APIJSONController<Long>. It provides the standard APIJSON CRUD endpoints (/get, /post, /put, /delete, etc.) plus login/logout, register, and other demo-specific endpoints. It integrates with RestTemplate for proxy calls and supports tagged routing (/get/{tag}, /crud/{method}/{tag}).

Usage

Import this controller when deploying the BigData APIJSON server variant. All APIJSON requests are routed through this controller's endpoints.

Code Reference

Source Location

Signature

@RestController
@Service
public class DemoController extends APIJSONController<Long> {
    @PostMapping("get")
    public String get(@RequestBody String request, HttpSession session);
    @PostMapping("post")
    public String post(@RequestBody String request, HttpSession session);
    @PostMapping("put")
    public String put(@RequestBody String request, HttpSession session);
    @PostMapping("delete")
    public String delete(@RequestBody String request, HttpSession session);
    @PostMapping("login")
    public JSONObject login(@RequestBody String request, HttpSession session);
    @PostMapping("logout")
    public JSONObject logout(HttpSession session);
    // ... more endpoints
}

Import

import apijson.boot.DemoController;

I/O Contract

See Implementation:APIJSON_APIJSON_Demo_DemoController for the I/O contract; the BigData variant follows the same pattern.

Usage Examples

See Implementation:APIJSON_APIJSON_Demo_DemoController usage examples; the API is identical across variants.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment