工作中遇到问题处理

用 BeanUtils.copyProperties(), 两个参数是上面的条件资源和目标对象.

private static RegistTimeImportLogtransToImportLog(RegistTimeImportLogDto dto) {
RegistTimeImportLog importLog = new RegistTimeImportLog();
try {
BeanUtils.copyProperties(dto,importLog);
} catch (IllegalAccessExceptione) {
e.printStackTrace();
} catch (InvocationTargetExceptione) {
e.printStackTrace();
}
return importLog;
}

 

concat() 函数,是用来连接字符串。

精确查询: select * from user where name="zhangsan"
模糊查询; select * from user where name like "%zhang%"

在实际的使用中,条件是作为参数传递进来的。 所以我们使用 concat() 函数

mybatis:
select * from user where name like concat("%", #{name},"%")

concat(str1,str2,str3,str4,…); 连接字符串函数,会生成一个字符串

 

微服务被多个项目调用,因版本更新问题,jar包中的application.yml文件有现场外的服务配置
jar包外面的没有,或者注释掉了,会通过eruaka找jar包里面的配置,服务会被卡住,调个接口就很慢

posted @ 2021-05-11 09:04  洋妞love  阅读(48)  评论(0)    收藏  举报