42 lines
1.0 KiB
Batchfile
42 lines
1.0 KiB
Batchfile
@echo off
|
|
echo === Spring Boot Redis Stream Demo 测试脚本 ===
|
|
|
|
echo 1. 检查项目结构...
|
|
if not exist "pom.xml" (
|
|
echo ❌ 未找到 pom.xml 文件
|
|
exit /b 1
|
|
)
|
|
if not exist "src\main\java\com\example\RedisStreamApplication.java" (
|
|
echo ❌ 未找到主启动类
|
|
exit /b 1
|
|
)
|
|
echo ✅ 项目结构正常
|
|
|
|
echo 2. 编译项目...
|
|
call mvn clean compile -q
|
|
if %errorlevel% neq 0 (
|
|
echo ❌ 项目编译失败
|
|
exit /b 1
|
|
)
|
|
echo ✅ 项目编译成功
|
|
|
|
echo 3. 运行单元测试...
|
|
call mvn test -q
|
|
if %errorlevel% neq 0 (
|
|
echo ❌ 单元测试失败
|
|
exit /b 1
|
|
)
|
|
echo ✅ 单元测试通过
|
|
|
|
echo.
|
|
echo === 测试完成 ===
|
|
echo.
|
|
echo 接下来可以:
|
|
echo 1. 启动应用: mvn spring-boot:run
|
|
echo 2. 发送消息: curl -X POST "http://localhost:8080/api/stream/send-batch?count=100"
|
|
echo 3. 查看信息: curl http://localhost:8080/api/stream/info
|
|
echo 4. 消费消息: curl -X POST "http://localhost:8080/api/stream/consume-manual?count=50"
|
|
echo.
|
|
echo 详细使用说明请查看 README.md
|
|
pause
|