Implementation:APIJSON APIJSON Demo DemoController Boot
| 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
- Repository: APIJSON_APIJSON_Demo
- File: APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/boot/DemoController.java
- Lines: 1-1741
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.