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 Boot

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 standard APIJSON Boot server variant.

Description

The DemoController class (Boot variant) is a Spring @RestController extending APIJSONController<Long>. It provides the standard APIJSON CRUD endpoints plus login/logout/register. It is the single-datasource variant of the main controller.

Usage

Import this controller when deploying the standard APIJSON Boot server. All APIJSON requests are routed through this controller.

Code Reference

Source Location

Signature

@RestController
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("login")
    public JSONObject login(@RequestBody String request, HttpSession session);
    // ... standard CRUD + auth endpoints
}

Import

import apijson.boot.DemoController;

I/O Contract

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

Usage Examples

See Implementation:APIJSON_APIJSON_Demo_DemoController usage examples.

Related Pages

Page Connections

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