diff --git a/demo/ALIPAY_SETUP_GUIDE.md b/demo/ALIPAY_SETUP_GUIDE.md index f05fb77..eb00440 100644 --- a/demo/ALIPAY_SETUP_GUIDE.md +++ b/demo/ALIPAY_SETUP_GUIDE.md @@ -219,3 +219,4 @@ ngrok http 8080 + diff --git a/demo/CODE_REVIEW_REPORT.md b/demo/CODE_REVIEW_REPORT.md index 6a3a486..e8c2ff8 100644 --- a/demo/CODE_REVIEW_REPORT.md +++ b/demo/CODE_REVIEW_REPORT.md @@ -114,3 +114,4 @@ + diff --git a/demo/EMAIL_VERIFICATION_LOGIN_GUIDE.md b/demo/EMAIL_VERIFICATION_LOGIN_GUIDE.md index 33da62e..0f9c660 100644 --- a/demo/EMAIL_VERIFICATION_LOGIN_GUIDE.md +++ b/demo/EMAIL_VERIFICATION_LOGIN_GUIDE.md @@ -280,3 +280,4 @@ if (result.success) { + diff --git a/demo/GIT_UPLOAD_GUIDE.md b/demo/GIT_UPLOAD_GUIDE.md index d99615a..1e697ee 100644 --- a/demo/GIT_UPLOAD_GUIDE.md +++ b/demo/GIT_UPLOAD_GUIDE.md @@ -207,3 +207,4 @@ git remote -v git branch ``` + diff --git a/demo/IJPAY_USAGE_GUIDE.md b/demo/IJPAY_USAGE_GUIDE.md index 932cd95..63603a5 100644 --- a/demo/IJPAY_USAGE_GUIDE.md +++ b/demo/IJPAY_USAGE_GUIDE.md @@ -233,3 +233,4 @@ A: IJPay 是对原生 SDK 的封装,提供了更简洁的 API。底层实现 + diff --git a/demo/IMAGE_TO_VIDEO_API_README.md b/demo/IMAGE_TO_VIDEO_API_README.md index 7decf20..296e5b0 100644 --- a/demo/IMAGE_TO_VIDEO_API_README.md +++ b/demo/IMAGE_TO_VIDEO_API_README.md @@ -300,3 +300,4 @@ grep "img2vid_abc123def456" logs/application.log + diff --git a/demo/LOGIN_CONFIGURATION_GUIDE.md b/demo/LOGIN_CONFIGURATION_GUIDE.md index edd77b1..fa103f6 100644 --- a/demo/LOGIN_CONFIGURATION_GUIDE.md +++ b/demo/LOGIN_CONFIGURATION_GUIDE.md @@ -6,3 +6,4 @@ + diff --git a/demo/POINTS_FREEZE_SYSTEM_README.md b/demo/POINTS_FREEZE_SYSTEM_README.md index 5ef5f5d..dddc497 100644 --- a/demo/POINTS_FREEZE_SYSTEM_README.md +++ b/demo/POINTS_FREEZE_SYSTEM_README.md @@ -301,3 +301,4 @@ public TaskQueue addTextToVideoTask(String username, String taskId) { + diff --git a/demo/PasswordChecker.java b/demo/PasswordChecker.java index 4a01ca1..d2a95f5 100644 --- a/demo/PasswordChecker.java +++ b/demo/PasswordChecker.java @@ -44,5 +44,6 @@ public class PasswordChecker { + diff --git a/demo/SES_SENDER_VERIFICATION_GUIDE.md b/demo/SES_SENDER_VERIFICATION_GUIDE.md index edd77b1..fa103f6 100644 --- a/demo/SES_SENDER_VERIFICATION_GUIDE.md +++ b/demo/SES_SENDER_VERIFICATION_GUIDE.md @@ -6,3 +6,4 @@ + diff --git a/demo/TENCENT_CONFIG_STATUS.md b/demo/TENCENT_CONFIG_STATUS.md index edd77b1..fa103f6 100644 --- a/demo/TENCENT_CONFIG_STATUS.md +++ b/demo/TENCENT_CONFIG_STATUS.md @@ -6,3 +6,4 @@ + diff --git a/demo/TENCENT_SES_MAIL_INTEGRATION.md b/demo/TENCENT_SES_MAIL_INTEGRATION.md index edd77b1..fa103f6 100644 --- a/demo/TENCENT_SES_MAIL_INTEGRATION.md +++ b/demo/TENCENT_SES_MAIL_INTEGRATION.md @@ -6,3 +6,4 @@ + diff --git a/demo/TENCENT_SES_MAIL_MULTIPLE_RECIPIENTS.md b/demo/TENCENT_SES_MAIL_MULTIPLE_RECIPIENTS.md index edd77b1..fa103f6 100644 --- a/demo/TENCENT_SES_MAIL_MULTIPLE_RECIPIENTS.md +++ b/demo/TENCENT_SES_MAIL_MULTIPLE_RECIPIENTS.md @@ -6,3 +6,4 @@ + diff --git a/demo/TENCENT_SES_STARTUP_CHECKLIST.md b/demo/TENCENT_SES_STARTUP_CHECKLIST.md index 494b963..4b456d3 100644 --- a/demo/TENCENT_SES_STARTUP_CHECKLIST.md +++ b/demo/TENCENT_SES_STARTUP_CHECKLIST.md @@ -292,3 +292,4 @@ ResourceNotFound.TemplateNotFound + diff --git a/demo/TEXT_TO_VIDEO_API_README.md b/demo/TEXT_TO_VIDEO_API_README.md index 238d62a..a8b274d 100644 --- a/demo/TEXT_TO_VIDEO_API_README.md +++ b/demo/TEXT_TO_VIDEO_API_README.md @@ -310,3 +310,4 @@ const startPolling = (taskId) => { + diff --git a/demo/TEXT_TO_VIDEO_IMPLEMENTATION_SUMMARY.md b/demo/TEXT_TO_VIDEO_IMPLEMENTATION_SUMMARY.md index edd77b1..fa103f6 100644 --- a/demo/TEXT_TO_VIDEO_IMPLEMENTATION_SUMMARY.md +++ b/demo/TEXT_TO_VIDEO_IMPLEMENTATION_SUMMARY.md @@ -6,3 +6,4 @@ + diff --git a/demo/TRANSACTION_AUDIT.md b/demo/TRANSACTION_AUDIT.md index 0aec793..77957a9 100644 --- a/demo/TRANSACTION_AUDIT.md +++ b/demo/TRANSACTION_AUDIT.md @@ -96,3 +96,4 @@ **✅ 所有事务都能正常关闭,没有发现连接泄漏风险** + diff --git a/demo/TRANSACTION_USAGE_REPORT.md b/demo/TRANSACTION_USAGE_REPORT.md index 17619da..c61a5e5 100644 --- a/demo/TRANSACTION_USAGE_REPORT.md +++ b/demo/TRANSACTION_USAGE_REPORT.md @@ -92,3 +92,4 @@ **✅ 所有实际使用的事务配置都是正确的,不会导致连接泄漏** + diff --git a/demo/USER_WORKS_SYSTEM_README.md b/demo/USER_WORKS_SYSTEM_README.md index c94a21b..6c030a0 100644 --- a/demo/USER_WORKS_SYSTEM_README.md +++ b/demo/USER_WORKS_SYSTEM_README.md @@ -180,3 +180,4 @@ const updateWork = async (workId, updateData) => { + diff --git a/demo/add_bio_column.sql b/demo/add_bio_column.sql index 908c801..e1fbf38 100644 --- a/demo/add_bio_column.sql +++ b/demo/add_bio_column.sql @@ -4,3 +4,4 @@ ALTER TABLE users ADD COLUMN bio TEXT COMMENT '个人简介'; + diff --git a/demo/cancel_image_to_video_task.sql b/demo/cancel_image_to_video_task.sql index 69549d7..87ae1d4 100644 --- a/demo/cancel_image_to_video_task.sql +++ b/demo/cancel_image_to_video_task.sql @@ -61,3 +61,4 @@ WHERE tq.task_id = 'img2vid_1957126e9dbd46e2'; -- 查询结果 SELECT '任务已取消' as result; + diff --git a/demo/delete_storyboard_tasks.sql b/demo/delete_storyboard_tasks.sql index 72b3d65..486a2d0 100644 --- a/demo/delete_storyboard_tasks.sql +++ b/demo/delete_storyboard_tasks.sql @@ -21,3 +21,4 @@ SELECT '删除完成' as result; SELECT COUNT(*) as remaining_task_queue FROM task_queue WHERE task_id IN ('sb_025db8e9d03846d6', 'sb_ced9291de75d444d', 'sb_60698935a2cd4289'); SELECT COUNT(*) as remaining_storyboard_tasks FROM storyboard_video_tasks WHERE task_id IN ('sb_025db8e9d03846d6', 'sb_ced9291de75d444d', 'sb_60698935a2cd4289'); + diff --git a/demo/fix_storyboard_result_url.sql b/demo/fix_storyboard_result_url.sql index 78ebcc2..9945bbd 100644 --- a/demo/fix_storyboard_result_url.sql +++ b/demo/fix_storyboard_result_url.sql @@ -4,3 +4,4 @@ ALTER TABLE storyboard_video_tasks MODIFY COLUMN result_url TEXT COMMENT '分镜图URL(可能是多个URL拼接)'; + diff --git a/demo/frontend/README.md b/demo/frontend/README.md index dc0b2dd..33856ca 100644 --- a/demo/frontend/README.md +++ b/demo/frontend/README.md @@ -444,5 +444,6 @@ MIT License + diff --git a/demo/frontend/src/App-backup.vue b/demo/frontend/src/App-backup.vue index e988749..e75c771 100644 --- a/demo/frontend/src/App-backup.vue +++ b/demo/frontend/src/App-backup.vue @@ -40,5 +40,6 @@ console.log('App.vue 加载成功') + diff --git a/demo/frontend/src/api/points.js b/demo/frontend/src/api/points.js index be76a3e..53bf36e 100644 --- a/demo/frontend/src/api/points.js +++ b/demo/frontend/src/api/points.js @@ -18,3 +18,4 @@ export const processExpiredRecords = () => { } + diff --git a/demo/frontend/src/components/Footer.vue b/demo/frontend/src/components/Footer.vue index 5f9b861..05240a5 100644 --- a/demo/frontend/src/components/Footer.vue +++ b/demo/frontend/src/components/Footer.vue @@ -103,5 +103,6 @@ + diff --git a/demo/src/main/java/com/example/demo/dto/MailMessage.java b/demo/src/main/java/com/example/demo/dto/MailMessage.java index 3a769d5..3096dad 100644 --- a/demo/src/main/java/com/example/demo/dto/MailMessage.java +++ b/demo/src/main/java/com/example/demo/dto/MailMessage.java @@ -75,3 +75,4 @@ public class MailMessage { + diff --git a/demo/src/main/java/com/example/demo/model/TaskStatus.java b/demo/src/main/java/com/example/demo/model/TaskStatus.java index c738e00..a2a39fe 100644 --- a/demo/src/main/java/com/example/demo/model/TaskStatus.java +++ b/demo/src/main/java/com/example/demo/model/TaskStatus.java @@ -269,3 +269,4 @@ public class TaskStatus { + diff --git a/demo/src/main/java/com/example/demo/repository/TaskStatusRepository.java b/demo/src/main/java/com/example/demo/repository/TaskStatusRepository.java index ec0c398..9f135ff 100644 --- a/demo/src/main/java/com/example/demo/repository/TaskStatusRepository.java +++ b/demo/src/main/java/com/example/demo/repository/TaskStatusRepository.java @@ -77,3 +77,4 @@ public interface TaskStatusRepository extends JpaRepository { + diff --git a/demo/src/main/java/com/example/demo/security/PlainTextPasswordEncoder.java b/demo/src/main/java/com/example/demo/security/PlainTextPasswordEncoder.java index d39ca5b..c16b760 100644 --- a/demo/src/main/java/com/example/demo/security/PlainTextPasswordEncoder.java +++ b/demo/src/main/java/com/example/demo/security/PlainTextPasswordEncoder.java @@ -46,5 +46,6 @@ public class PlainTextPasswordEncoder implements PasswordEncoder { + diff --git a/demo/src/main/java/com/example/demo/service/RealAIService.java b/demo/src/main/java/com/example/demo/service/RealAIService.java index 6518842..e40d843 100644 --- a/demo/src/main/java/com/example/demo/service/RealAIService.java +++ b/demo/src/main/java/com/example/demo/service/RealAIService.java @@ -1031,60 +1031,130 @@ public class RealAIService { /** * 根据类型获取优化提示词的系统指令 - * 使用文本块(Text Blocks)优化可读性 + * 参考Comfly项目的优化策略,使用更智能的提示词优化 */ private String getOptimizationPrompt(String type) { return switch (type) { case "text-to-video" -> """ - 你是一个专业的视频生成提示词优化专家。你的任务是将用户提供的简单描述优化为详细、专业、适合AI视频生成的英文提示词。 + 你是一个专业的AI视频生成提示词优化专家。你的任务是将用户提供的描述优化为详细、专业、适合AI视频生成的英文提示词。 - 优化要求: - 1. 将中文描述翻译成流畅的英文,确保语义准确 - 2. 添加详细的视觉细节描述(场景环境、人物特征、动作细节、光线效果、色彩风格、构图方式等) - 3. 使用专业的电影术语和视觉词汇(如:cinematic, wide shot, close-up等) - 4. 确保提示词清晰、具体、有画面感,能够准确指导AI生成 - 5. 保持原始意图不变,只优化表达方式和补充细节 - 6. 如果原始提示词已经是英文,直接优化,保持语言一致 - 7. 输出优化后的提示词,不要添加额外说明、引号或其他格式标记 - 8. 优化后的提示词应该直接可用,长度控制在合理范围内 + 核心优化策略: + 1. 语言处理: + - 如果输入是中文,翻译成流畅、地道的英文 + - 如果输入是英文,直接优化并增强表达 + - 确保语义准确,不丢失原始意图 + + 2. 视觉细节增强: + - 场景环境:详细描述背景、地点、氛围(如:sunset beach, urban street, cozy cafe) + - 人物特征:外貌、服装、表情、姿态(如:young woman with long hair, wearing casual clothes) + - 动作细节:具体动作、运动轨迹、速度(如:walking slowly, running gracefully, dancing elegantly) + - 光线效果:光照方向、强度、色温(如:soft golden hour light, dramatic shadows, natural daylight) + - 色彩风格:色调、饱和度、风格(如:vibrant colors, muted tones, cinematic color grading) + - 构图方式:镜头类型、角度、景深(如:wide establishing shot, close-up, shallow depth of field) + + 3. 专业术语使用: + - 电影术语:cinematic, wide shot, medium shot, close-up, extreme close-up, tracking shot, dolly shot + - 镜头运动:zoom in/out, pan left/right, tilt up/down, crane shot, aerial view + - 视觉效果:slow motion, time-lapse, smooth transition, dynamic movement + + 4. 时间维度: + - 明确视频时长和节奏 + - 描述动作的持续时间和变化 + - 添加时间相关的视觉元素(如:day to night transition) + + 5. 输出要求: + - 只输出优化后的提示词,不要添加任何说明、引号、标记或额外文字 + - 提示词应该直接可用,长度控制在150-300词之间 + - 保持专业、清晰、有画面感 + - 确保每个细节都有助于AI准确理解并生成视频 + + 示例优化: + 输入:"一个女孩在海边跑步" + 输出:"A young woman running gracefully along a pristine beach at golden hour, soft warm sunlight casting long shadows on the sand, gentle ocean waves in the background, cinematic wide shot with shallow depth of field, vibrant colors, smooth camera movement following the subject, professional video quality" """; case "image-to-video" -> """ - 你是一个专业的视频生成提示词优化专家。你的任务是将用户提供的简单描述优化为详细、专业、适合AI图生视频的英文提示词。 + 你是一个专业的AI图生视频提示词优化专家。你的任务是将用户提供的描述优化为详细、专业、适合AI图生视频的英文提示词。 - 优化要求: - 1. 将中文描述翻译成流畅的英文,确保语义准确 - 2. 重点关注动画效果、镜头运动、动作描述(如:zoom in, pan, fade等) - 3. 添加时间维度和动态效果描述(持续时间、运动方向、速度变化等) - 4. 确保提示词能准确表达图片到视频的转换需求,描述动画和运动的细节 - 5. 使用专业的视频制作术语(如:smooth transition, dynamic movement等) - 6. 如果原始提示词已经是英文,直接优化,保持语言一致 - 7. 输出优化后的提示词,不要添加额外说明、引号或其他格式标记 - 8. 优化后的提示词应该直接可用,长度控制在合理范围内 + 核心优化策略: + 1. 语言处理: + - 如果输入是中文,翻译成流畅、地道的英文 + - 如果输入是英文,直接优化并增强表达 + - 确保语义准确,不丢失原始意图 + + 2. 动画效果重点: + - 镜头运动:zoom in/out, pan left/right, tilt up/down, tracking shot, dolly movement + - 动态效果:smooth transition, dynamic movement, fluid motion, natural flow + - 时间变化:slow motion, time-lapse, gradual change, progressive movement + - 运动方向:left to right, top to bottom, forward, backward, circular motion + + 3. 转换需求: + - 描述从静态图片到动态视频的转换方式 + - 明确哪些元素需要动起来(人物、物体、背景等) + - 描述运动的速度、节奏和变化 + - 添加时间维度和动态效果描述 + + 4. 专业术语使用: + - 视频制作术语:smooth transition, dynamic movement, fluid animation, cinematic motion + - 镜头运动:zoom, pan, tilt, track, dolly, crane, aerial + - 视觉效果:fade in/out, cross dissolve, wipe, morph + + 5. 输出要求: + - 只输出优化后的提示词,不要添加任何说明、引号、标记或额外文字 + - 提示词应该直接可用,长度控制在100-250词之间 + - 重点突出动画和运动效果 + - 确保能准确表达图片到视频的转换需求 + + 示例优化: + 输入:"让图片中的人物动起来" + 输出:"Smooth and natural movement of the person in the image, gentle walking motion with fluid body movement, subtle camera pan following the subject, natural lighting and shadows, seamless animation transition from static to dynamic, professional video quality, smooth motion blur" """; case "storyboard" -> """ - 你是一个专业的分镜图提示词优化专家。你的任务是将用户提供的简单描述优化为详细、专业、适合生成故事板分镜图的英文提示词。 + 你是一个专业的分镜图提示词优化专家。你的任务是将用户提供的描述优化为详细、专业、适合生成故事板分镜图的英文提示词。 - 优化要求: - 1. 将中文描述翻译成流畅的英文,确保语义准确 - 2. 关注镜头构图、画面布局、视觉元素(如:composition, framing, visual hierarchy等) - 3. 适合生成专业分镜图风格,强调构图和画面元素,包含清晰的场景描述和视觉细节 - 4. 确保提示词清晰描述每个镜头的关键视觉元素和构图方式 - 5. 使用专业的电影分镜术语(如:establishing shot, medium shot, close-up, wide shot, over-the-shoulder等) - 6. 添加画面细节描述:场景环境、人物/物体的位置、光线、氛围等 - 7. 如果原始提示词已经是英文,直接优化,保持语言一致 - 8. 输出优化后的提示词,不要添加额外说明、引号或其他格式标记 - 9. 优化后的提示词应该直接可用,长度控制在合理范围内(200-500词) - 10. 参考格式:"(scene description), (shot type), (composition details), (visual elements), (lighting and atmosphere), professional storyboard style, cinematic framing" + 核心优化策略: + 1. 语言处理: + - 如果输入是中文,翻译成流畅、地道的英文 + - 如果输入是英文,直接优化并增强表达 + - 确保语义准确,不丢失原始意图 + + 2. 分镜图重点: + - 镜头构图:composition, framing, visual hierarchy, rule of thirds + - 画面布局:subject placement, background elements, foreground details + - 视觉元素:key visual elements, focal points, visual storytelling + - 场景描述:environment, setting, atmosphere, mood + + 3. 专业分镜术语: + - 镜头类型:establishing shot, wide shot, medium shot, close-up, extreme close-up, over-the-shoulder shot + - 构图方式:rule of thirds, center composition, leading lines, symmetry, asymmetry + - 视角:eye level, high angle, low angle, bird's eye view, worm's eye view + - 景深:shallow depth of field, deep focus, bokeh effect + + 4. 画面细节: + - 场景环境:详细描述背景、地点、氛围 + - 人物/物体位置:明确主体和背景的位置关系 + - 光线:光照方向、强度、色温、阴影 + - 氛围:情绪、风格、色调 + + 5. 输出要求: + - 只输出优化后的提示词,不要添加任何说明、引号、标记或额外文字 + - 提示词应该直接可用,长度控制在200-500词之间 + - 适合生成专业分镜图风格 + - 强调构图和画面元素,包含清晰的场景描述和视觉细节 + + 示例优化: + 输入:"一个咖啡的广告" + 输出:"Professional storyboard style, establishing shot of a modern coffee shop interior, warm ambient lighting, medium shot of a barista preparing coffee, close-up of coffee beans being ground, steam rising from espresso machine, shallow depth of field, cinematic framing, rule of thirds composition, vibrant colors, professional commercial photography style, detailed visual storytelling, coffee cup in foreground, blurred background, natural daylight through windows" """; default -> """ - 你是一个专业的提示词优化专家。请将用户提供的简单描述优化为详细、专业的英文提示词。 + 你是一个专业的AI提示词优化专家。请将用户提供的简单描述优化为详细、专业的英文提示词。 优化要求: - 1. 将中文描述翻译成流畅的英文,如果已经是英文则直接优化 - 2. 添加必要的视觉细节和描述,使提示词更加具体和专业 - 3. 保持原始意图不变,只优化表达方式 - 4. 输出优化后的提示词,不要添加额外说明、引号或其他格式标记 - 5. 优化后的提示词应该直接可用,长度控制在合理范围内 + 1. 语言处理:将中文描述翻译成流畅的英文,如果已经是英文则直接优化 + 2. 细节增强:添加必要的视觉细节和描述,使提示词更加具体和专业 + 3. 保持意图:保持原始意图不变,只优化表达方式 + 4. 专业术语:使用相关领域的专业术语和词汇 + 5. 输出格式:只输出优化后的提示词,不要添加任何说明、引号、标记或额外文字 + 6. 长度控制:优化后的提示词应该直接可用,长度控制在合理范围内 """; }; } diff --git a/demo/src/main/resources/application-dev.properties b/demo/src/main/resources/application-dev.properties index 1cbee0e..d870dec 100644 --- a/demo/src/main/resources/application-dev.properties +++ b/demo/src/main/resources/application-dev.properties @@ -4,6 +4,16 @@ spring.datasource.username=root spring.datasource.password=177615 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +# 数据库连接池配置(开发环境 - 支持50人并发) +spring.datasource.hikari.maximum-pool-size=30 +spring.datasource.hikari.minimum-idle=5 +spring.datasource.hikari.idle-timeout=300000 +spring.datasource.hikari.max-lifetime=1200000 +spring.datasource.hikari.connection-timeout=30000 +spring.datasource.hikari.leak-detection-threshold=60000 +spring.datasource.hikari.validation-timeout=3000 +spring.datasource.hikari.connection-test-query=SELECT 1 + # JPA配置 spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true @@ -12,6 +22,19 @@ spring.jpa.properties.hibernate.format_sql=true # 服务器配置 server.port=8080 +# Tomcat 最大POST大小(扩大请求体大小以支持大图片Base64编码) +server.tomcat.max-http-post-size=600MB +# Tomcat线程池配置(支持50人并发) +server.tomcat.threads.max=150 +server.tomcat.threads.min-spare=20 +server.tomcat.max-connections=500 +server.tomcat.accept-count=100 +server.tomcat.connection-timeout=20000 + +# 文件上传配置(扩大请求体大小以支持大图片Base64编码) +spring.servlet.multipart.max-file-size=500MB +spring.servlet.multipart.max-request-size=600MB +spring.servlet.multipart.enabled=true # 日志配置 logging.level.com.example.demo=DEBUG @@ -52,3 +75,10 @@ alipay.charset=UTF-8 alipay.sign-type=RSA2 alipay.notify-url=https://curtly-aphorismatic-ginger.ngrok-free.dev/api/payments/alipay/notify alipay.return-url=https://curtly-aphorismatic-ginger.ngrok-free.dev/api/payments/alipay/return + +# 视频处理配置 +# FFmpeg路径(如果FFmpeg不在PATH中,请指定完整路径) +# 已通过winget安装,使用完整路径(使用正斜杠避免转义问题) +app.ffmpeg.path=C:/Users/UI/AppData/Local/Microsoft/WinGet/Packages/Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe/ffmpeg-8.0-full_build/bin/ffmpeg.exe +# 临时文件目录 +app.temp.dir=./temp diff --git a/demo/src/main/resources/application-prod.properties b/demo/src/main/resources/application-prod.properties index 726a3c3..9c73d2c 100644 --- a/demo/src/main/resources/application-prod.properties +++ b/demo/src/main/resources/application-prod.properties @@ -7,12 +7,12 @@ spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver spring.datasource.username=${DB_USERNAME} spring.datasource.password=${DB_PASSWORD} -# 数据库连接池配置 (生产环境) -spring.datasource.hikari.maximum-pool-size=50 -spring.datasource.hikari.minimum-idle=10 +# 数据库连接池配置 (生产环境 - 支持50人并发) +spring.datasource.hikari.maximum-pool-size=30 +spring.datasource.hikari.minimum-idle=5 spring.datasource.hikari.idle-timeout=300000 spring.datasource.hikari.max-lifetime=1200000 -spring.datasource.hikari.connection-timeout=20000 +spring.datasource.hikari.connection-timeout=30000 spring.datasource.hikari.leak-detection-threshold=60000 spring.datasource.hikari.validation-timeout=3000 spring.datasource.hikari.connection-test-query=SELECT 1 @@ -28,6 +28,14 @@ spring.sql.init.mode=never # Thymeleaf 可启用缓存 spring.thymeleaf.cache=true +# AI API配置 (生产环境) +# 文生视频、图生视频、分镜视频都使用Comfly API +ai.api.base-url=${AI_API_BASE_URL:https://ai.comfly.chat} +ai.api.key=${AI_API_KEY} +# 文生图使用Comfly API +ai.image.api.base-url=${AI_IMAGE_API_BASE_URL:https://ai.comfly.chat} +ai.image.api.key=${AI_IMAGE_API_KEY} + # 支付宝配置 (生产环境) alipay.app-id=${ALIPAY_APP_ID} alipay.private-key=${ALIPAY_PRIVATE_KEY} @@ -38,7 +46,6 @@ alipay.sign-type=RSA2 alipay.notify-url=${ALIPAY_NOTIFY_URL} alipay.return-url=${ALIPAY_RETURN_URL} - # JWT配置 - 使用环境变量 jwt.secret=${JWT_SECRET} jwt.expiration=${JWT_EXPIRATION:604800000} @@ -53,6 +60,13 @@ tencent.ses.from-name=AIGC平台 # 如果未配置或为0,将使用开发模式(仅记录日志) tencent.ses.template-id=${TENCENT_SES_TEMPLATE_ID} +# Tomcat线程池配置 (生产环境 - 支持50人并发) +server.tomcat.threads.max=150 +server.tomcat.threads.min-spare=20 +server.tomcat.max-connections=500 +server.tomcat.accept-count=100 +server.tomcat.connection-timeout=20000 + # 生产环境日志配置 logging.level.root=INFO logging.level.com.example.demo=INFO @@ -60,6 +74,20 @@ logging.level.org.springframework.security=WARN logging.file.name=${LOG_FILE_PATH:./logs/application.log} logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n +# 视频处理配置 +# 临时文件目录(相对路径:基于应用运行目录,或绝对路径) +# 生产环境建议使用绝对路径,如:/app/temp 或 C:\app\temp +app.temp.dir=${TEMP_DIR:./temp} +# FFmpeg路径(如果FFmpeg在PATH中,使用 "ffmpeg",否则使用完整路径) +# 生产环境建议使用完整路径,如:/usr/bin/ffmpeg 或 C:\ffmpeg\bin\ffmpeg.exe +app.ffmpeg.path=${FFMPEG_PATH:ffmpeg} + +# 文件上传配置 +# 上传文件保存目录(相对路径:基于应用运行目录,或绝对路径) +# 生产环境建议使用绝对路径,如:/app/uploads 或 C:\app\uploads +# 注意:确保应用有读写权限 +app.upload.path=${UPLOAD_PATH:./uploads} + diff --git a/demo/src/main/resources/db/migration/V3__Create_Task_Queue_Table.sql b/demo/src/main/resources/db/migration/V3__Create_Task_Queue_Table.sql index c152960..2473509 100644 --- a/demo/src/main/resources/db/migration/V3__Create_Task_Queue_Table.sql +++ b/demo/src/main/resources/db/migration/V3__Create_Task_Queue_Table.sql @@ -36,3 +36,4 @@ CREATE TABLE IF NOT EXISTS task_queue ( + diff --git a/demo/src/main/resources/db/migration/V4__Add_Points_Freeze_System.sql b/demo/src/main/resources/db/migration/V4__Add_Points_Freeze_System.sql index 61e2486..673d881 100644 --- a/demo/src/main/resources/db/migration/V4__Add_Points_Freeze_System.sql +++ b/demo/src/main/resources/db/migration/V4__Add_Points_Freeze_System.sql @@ -35,3 +35,4 @@ CREATE TABLE IF NOT EXISTS points_freeze_records ( + diff --git a/demo/src/main/resources/db/migration/V6__Create_Task_Status_Table.sql b/demo/src/main/resources/db/migration/V6__Create_Task_Status_Table.sql index 6318049..c698681 100644 --- a/demo/src/main/resources/db/migration/V6__Create_Task_Status_Table.sql +++ b/demo/src/main/resources/db/migration/V6__Create_Task_Status_Table.sql @@ -38,3 +38,4 @@ CREATE TABLE task_status ( + diff --git a/demo/src/main/resources/templates/orders/admin.html b/demo/src/main/resources/templates/orders/admin.html index 23504f3..a4ef961 100644 --- a/demo/src/main/resources/templates/orders/admin.html +++ b/demo/src/main/resources/templates/orders/admin.html @@ -582,5 +582,6 @@ + diff --git a/demo/src/main/resources/templates/orders/detail.html b/demo/src/main/resources/templates/orders/detail.html index d3a70dd..782f06a 100644 --- a/demo/src/main/resources/templates/orders/detail.html +++ b/demo/src/main/resources/templates/orders/detail.html @@ -498,5 +498,6 @@ + diff --git a/demo/src/main/resources/templates/orders/form.html b/demo/src/main/resources/templates/orders/form.html index 92d4291..126ec45 100644 --- a/demo/src/main/resources/templates/orders/form.html +++ b/demo/src/main/resources/templates/orders/form.html @@ -537,5 +537,6 @@ + diff --git a/demo/start-image-to-video-test.bat b/demo/start-image-to-video-test.bat index 710872e..9c1816c 100644 --- a/demo/start-image-to-video-test.bat +++ b/demo/start-image-to-video-test.bat @@ -39,3 +39,4 @@ pause > nul + diff --git a/demo/test-api-connection.java b/demo/test-api-connection.java index b34bf2c..047289b 100644 --- a/demo/test-api-connection.java +++ b/demo/test-api-connection.java @@ -66,3 +66,4 @@ public class TestApiConnection { + diff --git a/demo/test_api.py b/demo/test_api.py index ef416ef..46345af 100644 --- a/demo/test_api.py +++ b/demo/test_api.py @@ -25,3 +25,4 @@ except Exception as e: + diff --git a/demo/test_jwt.py b/demo/test_jwt.py index 4fe5660..d29270b 100644 --- a/demo/test_jwt.py +++ b/demo/test_jwt.py @@ -33,3 +33,4 @@ else: + diff --git a/demo/test_payment.py b/demo/test_payment.py index d8ef6a1..85f8225 100644 --- a/demo/test_payment.py +++ b/demo/test_payment.py @@ -69,3 +69,4 @@ if __name__ == "__main__": +