中科国力的一些笔记
ASR ( automatic speech recognition ) 自动语音识别
TTS 文本转成语音
mac 打包部署到服务器出现循环依赖
在循环以来的类上加上@Lazy
既可解决此问题
MyBatis Plus 的一些Api
lt:less than 小于 le:less than or equal to 小于等于 eq:equal to 等于 ne:not equal to 不等于 ge:greater than or equal to 大于等于 gt:greater than 大于
mysql脚本
create table sys_memu_bak as select * from sys_menu
备份数据库
use inside_manage; ALTER TABLE im_corpus_audio ADD dept_city_name VARCHAR(255) comment "地市标识"; ALTER TABLE im_corpus_audio_content ADD dept_city_name VARCHAR(255) comment "地市标识";
mybatis-plus
一些奇怪且简单的链式操作
Long count = new LambdaQueryChainWrapper<>(contactDetailMapper) .eq(ContactDetail::getContactId, contactDetail.getContactId()) .count();
局方
代表电信
Assert.assertEquals方法
Assert.assertEquals(5, userList.size());
当两个参数不想等,抛出异常
link
bug
spring boot2.6.1 继承swagger报错:
swagger Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
因为Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher。
解决办法,修改application.yal
spring: mvc: pathmatch: matching-strategy: ant_path_matcher
ftp 文件下载,处理文件
资源相关的流操作要用Try-with-resources
会自动关闭流,还要把整个连接放在try里以防编码出问题,导致文件下载失败
所有代码都要做好异常处理,避免因异常导致程序停止
项目构建
<dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.2</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>6.0.9.Final</version> </dependency> <dependency> <groupId>com.gitee.wxtoos</groupId> <artifactId>wx-java-miniapp-spring-boot-starter</artifactId> <version>3.5.0</version> </dependency> <!--前后端校验--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <!-- <dependency>--> <!-- <groupId>io.springfox</groupId>--> <!-- <artifactId>springfox-boot-starter</artifactId>--> <!-- <version>3.0.0</version>--> <!-- </dependency>--> <dependency> <groupId>com.alibaba.nls</groupId> <artifactId>nls-sdk-recognizer</artifactId> <version>2.2.1</version> </dependency> <!-- https://mvnrepository.com/artifact/org.bytedeco/javacpp --> <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacpp</artifactId> <version>1.5.8</version> </dependency> <!-- https://mvnrepository.com/artifact/org.bytedeco.javacpp-presets/opencv --> <dependency> <groupId>org.bytedeco.javacpp-presets</groupId> <artifactId>opencv</artifactId> <version>4.0.1-1.4.4</version> </dependency> <!-- https://mvnrepository.com/artifact/org.bytedeco/ffmpeg --> <dependency> <groupId>org.bytedeco</groupId> <artifactId>ffmpeg</artifactId> <version>4.1.3-1.5</version> </dependency> <!-- https://mvnrepository.com/artifact/com.alibaba.nls/nls-sdk-common --> <dependency> <groupId>com.alibaba.nls</groupId> <artifactId>nls-sdk-common</artifactId> <version>2.2.9</version> </dependency> <!-- https://mvnrepository.com/artifact/com.huaban/jieba-analysis --> <dependency> <groupId>com.huaban</groupId> <artifactId>jieba-analysis</artifactId> <version>1.0.2</version> </dependency> <!-- https://mvnrepository.com/artifact/com.alibaba.nls/nls-sdk-tts --> <dependency> <groupId>com.alibaba.nls</groupId> <artifactId>nls-sdk-tts</artifactId> <version>2.2.9</version> </dependency> <!-- https://mvnrepository.com/artifact/p6spy/p6spy --> <dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>3.9.1</version> </dependency>
有什么不同见解可以在评论区共同讨论
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!