17964d4ee7ab8f599fc7b1d96bd0e45afa8337f4
CadLabel Backend
Spring Boot backend skeleton for CadLabel.
Stack
- Java 21
- Spring Boot 3.4.4
- Maven
- MyBatis-Plus
- MySQL
- Tencent Cloud COS SDK
This project intentionally does not include Spring Security, JWT, login APIs, or user-system code.
Run
mvn test
mvn spring-boot:run
The default profile is dev. Configure these environment variables before starting against a real database and COS bucket:
export APP_DB_URL='jdbc:mysql://localhost:3306/cadlabel?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&createDatabaseIfNotExist=true'
export APP_DB_USERNAME='root'
export APP_DB_PASSWORD=''
export APP_COS_SECRET_ID=''
export APP_COS_SECRET_KEY=''
export APP_COS_BUCKET=''
export APP_COS_REGION='ap-beijing'
export APP_COS_PUBLIC_BASE_URL=''
COS APIs
POST /api/cos/upload-sessionsissues temporary STS credentials for direct browser upload.POST /api/cos/objectsaccepts multipart file upload and stores the file through the backend.
Both endpoints return the standard ApiResponse<T> shape.
Replace The Annotation Dataset
The import runner accepts only solidworks.rebuild_extract.v1 JSON files. It clears existing
models, histories, annotations, structures, functions, and their relations before importing the
new dataset. It is disabled by default and should run as a non-web process:
APP_JSON_DATASET_IMPORT_ENABLED=true \
APP_JSON_DATASET_IMPORT_SOURCE_DIRECTORY='/absolute/path/to/output_json 2' \
APP_JSON_DATASET_IMPORT_CATEGORY_ID=1 \
mvn spring-boot:run -Dspring-boot.run.arguments=--spring.main.web-application-type=none
The source files contain feature trees only. The importer creates annotation histories but does not fabricate STEP, GLB, or topology assets.
Description
Languages
Java
100%