随笔分类 -  Java

摘要:File file = new File(imgPath); FileSystemResource resource = new FileSystemResource(file); // 2. 构建请求体 MultiValueMap<String, Object> body = new Linked 阅读全文
posted @ 2025-03-05 01:01 TIFOSI_Z 阅读(2) 评论(0) 推荐(0) 编辑
摘要:不要添加前缀 控制器和类 @PostMapping("text-only") public List<TextDto> ocrTextOnly(@RequestBody OcrParam ocrParam) { //TODO return ocrapiService.ocrText(ocrParam 阅读全文
posted @ 2025-03-05 00:53 TIFOSI_Z 阅读(4) 评论(0) 推荐(0) 编辑
摘要:网上看大部分是断点引起的问题 但是本项目的问题不同 在于 @Configuration public class WsConfig { @Value("${ws.username}") private String userName; @Value("${ws.password}") private 阅读全文
posted @ 2021-11-25 16:55 TIFOSI_Z 阅读(333) 评论(0) 推荐(0) 编辑
摘要:Java中Long类型向前端返回值 主要在id之类的字段上 需要将Long转为String 例如: agencyId: "258323682286370816" 如果不转换直接传Long的话 就会变成 造成越界 数据错误 agencyId: 258323682286370800 阅读全文
posted @ 2021-11-16 11:03 TIFOSI_Z 阅读(80) 评论(0) 推荐(0) 编辑
摘要://将两个类同名属性 source的布尔值 设置到目标值的同名字符类别属性上 true->"1" false->"0" public static void setSameNameField(Object source, Object target) throws InvocationTargetE 阅读全文
posted @ 2021-11-15 17:30 TIFOSI_Z 阅读(220) 评论(0) 推荐(0) 编辑
摘要://此处用的包是 package org.springframework.beans; public static void copyProperties(Object source, Object target) throws BeansException { copyProperties(sou 阅读全文
posted @ 2021-11-02 17:25 TIFOSI_Z 阅读(38) 评论(0) 推荐(0) 编辑
摘要:@RequiredArgsConstructor(onConstructor_ = @Autowired) public class V3CauseCustomDaoImpl implements V3CauseCustomDao { private final BiDao biDao;privat 阅读全文
posted @ 2021-10-26 15:46 TIFOSI_Z 阅读(46) 评论(0) 推荐(0) 编辑
摘要://判断处罚类型和金额 predicates.add( builder.or( builder.and( builder.equal(root.get("targetType"), TargetType.TARGET_TYPE_1.getType()), builder.greaterThanOrE 阅读全文
posted @ 2021-10-26 14:43 TIFOSI_Z 阅读(235) 评论(0) 推荐(0) 编辑
摘要:得到ServletContext3种方式: ServletContext application1 = request.getServertContext(); ServletContext application2 = this.getServletContext(); ServletContex 阅读全文
posted @ 2019-03-23 20:59 TIFOSI_Z 阅读(80) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示