- 新增TTS工具类TTSUtil,实现文本到语音的转换并通过HTTP响应返回音频流 - 在LessonPlanController添加获取计划单词列表及单词语音生成接口 - 前端新增PlanTTS页面,实现计划单词TTS的加载、生成、播放及下载功能 - 路由新增PlanTTS路由,支持访问TTS生成功能页面 - 配置文件application-dev.yml新增OpenAI TTS相关配置 - WordExportUtil生成计划文档时嵌入对应页面二维码图片 - 引入spring-ai-openai相关依赖支持OpenAI模型调用 - 新增单词语音相关请求与响应VO类,方便接口数据传输 - 新增计划单词获取接口plan/word/voice对应前端api - 新增计划单词语音合成接口plan/word/voice/tts对应前端api - 添加二维码生成逻辑,用于生成计划文档中的二维码图片链接 - 添加单元测试模版VoiceTest,预留TTS工具类测试接口
413 lines
15 KiB
XML
413 lines
15 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>com.yinlihupo</groupId>
|
|
<artifactId>enlish</artifactId>
|
|
<version>${revision}</version>
|
|
|
|
<!-- 项目名称 -->
|
|
<name>${project.artifactId}</name>
|
|
<!-- 项目描述 -->
|
|
<description>智能化英语教学</description>
|
|
|
|
<!-- 多模块项目需要配置打包方式为 pom -->
|
|
<packaging>pom</packaging>
|
|
|
|
<!-- 子模块管理 -->
|
|
<modules>
|
|
<module>enlish-service</module>
|
|
<module>enlish-framework</module>
|
|
</modules>
|
|
|
|
<properties>
|
|
<!-- 项目版本号 -->
|
|
<revision>0.0.1-SNAPSHOT</revision>
|
|
<!-- JDK 版本 -->
|
|
<java.version>17</java.version>
|
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
|
<!-- 项目编码 -->
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<!-- Maven 相关版本号 -->
|
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
|
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
|
|
<!-- 依赖包版本 -->
|
|
<lombok.version>1.18.30</lombok.version>
|
|
<spring-boot.version>3.4.12</spring-boot.version>
|
|
<jackson.version>2.16.1</jackson.version>
|
|
<mysql-connector-java.version>8.0.29</mysql-connector-java.version>
|
|
<druid.version>1.2.23</druid.version>
|
|
<sa-token>1.44.0</sa-token>
|
|
<guava.version>33.0.0-jre</guava.version>
|
|
<hutool.version>5.8.26</hutool.version>
|
|
<commons-lang3.version>3.12.0</commons-lang3.version>
|
|
<dysmsapi.version>2.0.24</dysmsapi.version>
|
|
<nacos-config.version>0.3.0-RC</nacos-config.version>
|
|
<transmittable-thread-local.version>2.14.2</transmittable-thread-local.version>
|
|
<minio.version>8.2.1</minio.version>
|
|
<minio.version>8.2.1</minio.version>
|
|
<aliyun-sdk-oss.version>3.17.4</aliyun-sdk-oss.version>
|
|
<jaxb-api.version>2.3.1</jaxb-api.version>
|
|
<activation.version>1.1.1</activation.version>
|
|
<jaxb-runtime.version>2.3.3</jaxb-runtime.version>
|
|
<feign-form.version>3.8.0</feign-form.version>
|
|
<caffeine.version>3.1.8</caffeine.version>
|
|
<rocketmq.version>2.2.3</rocketmq.version>
|
|
<buffertrigger.version>0.2.21</buffertrigger.version>
|
|
<mybatis-spring-boot-starter>3.0.4</mybatis-spring-boot-starter>
|
|
|
|
<mybatis-generator-maven-plugin.version>1.3.5</mybatis-generator-maven-plugin.version>
|
|
</properties>
|
|
|
|
<!-- 统一依赖管理 -->
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
<groupId>com.yinlihupo</groupId>
|
|
<artifactId>enlish-common</artifactId>
|
|
<version>${revision}</version>
|
|
</dependency>
|
|
|
|
<!-- 业务接口日志组件 -->
|
|
<dependency>
|
|
<groupId>com.yinlihupo</groupId>
|
|
<artifactId>enlish-spring-boot-starter-biz-operationlog</artifactId>
|
|
<version>${revision}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.yinlihupo.framework.jackson</groupId>
|
|
<artifactId>enlish-spring-boot-starter-jackson</artifactId>
|
|
<version>${revision}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.poi</groupId>
|
|
<artifactId>poi</artifactId>
|
|
<version>5.2.3</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.poi</groupId>
|
|
<artifactId>poi-ooxml</artifactId>
|
|
<version>5.2.3</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-core</artifactId>
|
|
<version>2.20.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.deepoove</groupId>
|
|
<artifactId>poi-tl</artifactId>
|
|
<version>1.12.1</version>
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
<groupId>org.openpnp</groupId>
|
|
<artifactId>opencv</artifactId>
|
|
<version>4.7.0-0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>net.sourceforge.tess4j</groupId>
|
|
<artifactId>tess4j</artifactId>
|
|
<version>5.4.0</version>
|
|
</dependency>
|
|
|
|
|
|
<!-- 避免编写那些冗余的 Java 样板式代码,如 get、set 等 -->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</dependency>
|
|
<!-- Spring Boot 官方依赖管理 -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-dependencies</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
|
|
<!-- Caffeine 本地缓存 -->
|
|
<dependency>
|
|
<groupId>com.github.ben-manes.caffeine</groupId>
|
|
<artifactId>caffeine</artifactId>
|
|
<version>${caffeine.version}</version>
|
|
</dependency>
|
|
|
|
<!-- 快手 Buffer Trigger -->
|
|
<dependency>
|
|
<groupId>com.github.phantomthief</groupId>
|
|
<artifactId>buffer-trigger</artifactId>
|
|
<version>${buffertrigger.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Feign 表单提交 -->
|
|
<dependency>
|
|
<groupId>io.github.openfeign.form</groupId>
|
|
<artifactId>feign-form</artifactId>
|
|
<version>${feign-form.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>transmittable-thread-local</artifactId>
|
|
<version>${transmittable-thread-local.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Jackson -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
<version>${jackson.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-core</artifactId>
|
|
<version>${jackson.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>cn.dev33</groupId>
|
|
<artifactId>sa-token-reactor-spring-boot3-starter</artifactId>
|
|
<version>${sa-token.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Mybatis -->
|
|
<dependency>
|
|
<groupId>org.mybatis.spring.boot</groupId>
|
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
|
<version>${mybatis-spring-boot-starter}</version>
|
|
</dependency>
|
|
|
|
<!-- MySQL 驱动 -->
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>${mysql-connector-java.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Druid 数据库连接池 -->
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
|
<version>${druid.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Sa-Token 权限认证 -->
|
|
<dependency>
|
|
<groupId>cn.dev33</groupId>
|
|
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
|
<version>${sa-token}</version>
|
|
</dependency>
|
|
|
|
<!-- Sa-Token 整合 RedisTemplate -->
|
|
<dependency>
|
|
<groupId>cn.dev33</groupId>
|
|
<artifactId>sa-token-redis-template</artifactId>
|
|
<version>${sa-token}</version>
|
|
</dependency>
|
|
|
|
<!-- 相关工具类 -->
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
<version>${guava.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>cn.hutool</groupId>
|
|
<artifactId>hutool-all</artifactId>
|
|
<version>${hutool.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
<version>${commons-lang3.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>javax.xml.bind</groupId>
|
|
<artifactId>jaxb-api</artifactId>
|
|
<version>${jaxb-api.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>javax.activation</groupId>
|
|
<artifactId>activation</artifactId>
|
|
<version>${activation.version}</version>
|
|
</dependency>
|
|
|
|
<!-- 阿里云短信发送 -->
|
|
<dependency>
|
|
<groupId>com.aliyun</groupId>
|
|
<artifactId>dysmsapi20170525</artifactId>
|
|
<version>${dysmsapi.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>io.jsonwebtoken</groupId>
|
|
<artifactId>jjwt</artifactId>
|
|
<version>0.9.1</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.auth0</groupId>
|
|
<artifactId>java-jwt</artifactId>
|
|
<version>4.4.0</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>commons-codec</groupId>
|
|
<artifactId>commons-codec</artifactId>
|
|
<version>1.15</version>
|
|
</dependency>
|
|
|
|
<!-- no more than 2.3.3-->
|
|
<dependency>
|
|
<groupId>org.glassfish.jaxb</groupId>
|
|
<artifactId>jaxb-runtime</artifactId>
|
|
<version>${jaxb-runtime.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-bom</artifactId>
|
|
<version>1.1.0</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
<groupId>com.google.zxing</groupId>
|
|
<artifactId>core</artifactId>
|
|
<version>3.5.2</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.google.zxing</groupId>
|
|
<artifactId>javase</artifactId>
|
|
<version>3.5.2</version>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<!-- 统一插件管理 -->
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>repackage</id>
|
|
<goals>
|
|
<goal>repackage</goal> <!-- 将依赖的 Jar 一起打包 -->
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>${maven-compiler-plugin.version}</version>
|
|
<configuration>
|
|
<source>${java.version}</source>
|
|
<target>${java.version}</target>
|
|
<encoding>${project.build.sourceEncoding}</encoding>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
<!-- 代码生成器 -->
|
|
<plugin>
|
|
<groupId>org.mybatis.generator</groupId>
|
|
<artifactId>mybatis-generator-maven-plugin</artifactId>
|
|
<version>${mybatis-generator-maven-plugin.version}</version>
|
|
<configuration>
|
|
<!-- 允许移动生成的文件 -->
|
|
<verbose>true</verbose>
|
|
<!-- 允许覆盖生成的文件 -->
|
|
<overwrite>true</overwrite>
|
|
</configuration>
|
|
<!-- 此插件需要连接数据库,所以需要依赖 MySQL 驱动 -->
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>${mysql-connector-java.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
|
|
<plugins>
|
|
<!-- 统一 revision 版本, 解决子模块打包无法解析 ${revision} 版本号问题 -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>flatten-maven-plugin</artifactId>
|
|
<version>${flatten-maven-plugin.version}</version>
|
|
<configuration>
|
|
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
|
<updatePomFile>true</updatePomFile>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>flatten</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>flatten</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>flatten.clean</id>
|
|
<phase>clean</phase>
|
|
<goals>
|
|
<goal>clean</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
<!-- 添加华为云、阿里云 maven 中央仓库,提升依赖下载速度 -->
|
|
<repositories>
|
|
<repository>
|
|
<id>huaweicloud</id>
|
|
<name>huawei</name>
|
|
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
|
</repository>
|
|
<repository>
|
|
<id>aliyunmaven</id>
|
|
<name>aliyun</name>
|
|
<url>https://maven.aliyun.com/repository/public</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
</project>
|