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