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

Environment:APIJSON APIJSON Demo Spring Boot

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

Overview

Spring Boot 3.2.5 runtime on JDK 17+ with Jakarta Servlet 6.0.0, serving as the base web framework for the APIJSON Demo server.

Description

This environment provides the core Spring Boot 3.2.5 web application context for the APIJSON Demo server. It uses the Jakarta Servlet API (not the older javax namespace) and targets JDK 17 or higher. The stack includes Spring Boot's auto-configuration, embedded Tomcat, scheduled task support, and REST client capabilities. It excludes logback-classic to avoid logging conflicts and re-includes snakeyaml 2.2 for YAML configuration parsing.

Usage

Use this environment for any APIJSON Demo implementation that relies on Spring's @Configuration, @Service, @RestController, @Value injection, @Scheduled tasks, or @EventListener hooks. It is the mandatory prerequisite for the DemoController, DemoParser, DemoVerifier, DemoFunctionParser, DemoDataSourceConfig, DynamicDataSource, AutoTestRegressionScheduler, AutoTestNodeProcessSupervisor, MethodAccess_Annotation, and Privacy_Model implementations.

System Requirements

Category Requirement Notes
OS Linux / macOS / Windows Any OS supporting JDK 17
Hardware 2GB RAM minimum 4GB recommended for multi-datasource + auto-test
Disk 1GB SSD For application JAR, logs, and static test UI assets

Dependencies

System Packages

  • JDK 17 or higher
  • Maven 3.8+ (build time)

Java Packages

  • `spring-boot-starter-web` = 3.2.5
  • `spring-boot-starter-mail` = 3.2.5
  • `jakarta.servlet-api` = 6.0.0
  • `fastjson2` = 2.0.65
  • `APIJSON` = 8.3.2 (com.github.Tencent)
  • `apijson-framework` = 8.3.2
  • `apijson-fastjson2` = 1.3.3
  • `commons-text` = 1.11.0
  • `httpclient5` = 5.3 (for HTTP PATCH delegation)
  • `snakeyaml` = 2.2
  • `easyexcel` = 4.0.3

Credentials

No specific environment variables required for the base Spring Boot runtime. Database, Redis, and mail credentials are handled by their respective environments.

Quick Install

# Build and run (requires JDK 17+ and Maven)
cd APIJSON-Java-Server/APIJSONBoot-MultiDataSource
mvn clean package -DskipTests
java -jar target/apijson-boot-multi-datasource-8.3.2.jar

Code Evidence

Spring Boot version and JDK 17 target from `pom.xml:17-22`:

<java.version>17</java.version>
<spring-boot-starter-web.version>3.2.5</spring-boot-starter-web.version>
<!-- JDK 17+ 对应 SpringBoot 3.0+ -->

Jakarta Servlet import (not javax) from `AutoTestRegressionScheduler.java:7-8`:

import jakarta.servlet.ServletContext;
import jakarta.servlet.http.HttpSession;

Spring service and scheduling annotations from `AutoTestNodeProcessSupervisor.java:19-20`:

@Service
public class AutoTestNodeProcessSupervisor {
    @EventListener(ApplicationReadyEvent.class)
    public void startWhenApplicationReady() { ... }

Common Errors

Error Message Cause Solution
`java.lang.NoSuchMethodError: javax.servlet...` Using javax.servlet instead of jakarta.servlet Ensure all imports use `jakarta.servlet` (Spring Boot 3.x)
`ClassNotFoundException: jdk.nashorn...` Nashorn removed from JDK 15+ without standalone dep Add `org.openjdk.nashorn:nashorn-core` dependency
`spring-boot-starter-web` version conflict SnakeYAML or logback version mismatch Exclude logback-classic, re-include snakeyaml 2.2

Compatibility Notes

  • JDK 17+ required: Spring Boot 3.x mandates JDK 17 or higher. JDK 11 will not work.
  • Jakarta namespace: All servlet imports must use `jakarta.servlet`, not `javax.servlet`.
  • JitPack repository: APIJSON dependencies are hosted on JitPack, which must be configured in `<repositories>`.
  • Logback exclusion: `spring-boot-starter-web` excludes `logback-classic` to prevent conflicts with the APIJSON logging setup.

Related Pages

Page Connections

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