# JavaEE4 **Repository Path**: qqlongww/java-ee4 ## Basic Information - **Project Name**: JavaEE4 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-16 - **Last Updated**: 2026-11-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # JavaEE 实验四:MySQL 与 MongoDB 日志读写性能对比 本仓库包含两个相互独立的 Spring Boot 工程: - `jpa-service`:Spring Data JPA + MySQL。 - `mongo-service`:由成员 C 维护的 Spring Data MongoDB 实现。 两套实现遵循根目录 [API 契约](docs/api-contract.md),对外提供相同的日志写入和条件分页查询接口。 Java 包名: - JPA:`com.example.logbenchmark.jpa` - Mongo:`com.example.logbenchmark.mongo` ## JPA 服务构建 需要 JDK 21 和 Maven 3.9.16。 ```bash cd jpa-service mvn -DskipTests package docker build -t log-jpa:1.0 . ``` ## JPA 服务运行配置 | 环境变量 | 默认值 | |---|---| | `SERVER_PORT` | `8081` | | `DB_URL` | `jdbc:mysql://mysql-worker:3306/oomall_demo?useSSL=false&serverTimezone=UTC&characterEncoding=utf8` | | `DB_USERNAME` | 无默认值,由部署环境注入 | | `DB_PASSWORD` | 无默认值,由部署环境注入 | 数据库密码不得写入 Git。