@RequestBody 用来接收json字符串给对应的字符串或者对象
出这个错误java.lang.NoSuchMethodException: tk.mybatis.mapper.provider.base.BaseInsertProvider.
是因为导入的scan mapper的包不对
https://www.imooc.com/qadetail/259034?t=418041
应该导入
tk.mybatis.spring.annotation.MapperScan-使用mybatis-generator生成的Mapper接口部分无法使用
public Bgm queryBgmById(String bgmId) {
Bgm record = new Bgm();
record.setId(bgmId);
//bgmMapper.selectByPrimaryKey(bgmId);
//上面的selectByPrimaryKey,以主键查询返回的结果为null,用selectOne
//查询可以返回正确的结果
return bgmMapper.selectOne(record);
}如果某个文件夹不存在,直接在此文件夹下生成文件将失败,并且不会报错????
File outFile = new File(finalVideoPath);
if(outFile.getParentFile() != null) {
//创建父文件夹
outFile.getParentFile().mkdirs(); //这里如果不生成文件夹
//下面的代码生成文件将失败?????
}
fileOutputStream = new FileOutputStream(outFile);
inputStream = file.getInputStream();
IOUtils.copy(inputStream, fileOutputStream);
spring boot抖音短视频学习笔记
最新推荐文章于 2023-07-31 23:04:59 发布