- 博客(11)
- 收藏
- 关注
转载 用mybatis 拦截器 为insert update操作填充字段
用mybatis 拦截器 为insert update操作填充字段 import org.apache.ibatis.executor.Executor; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.mapping.ParameterMapping; import org.apache.ibatis.mapping.S
2020-07-26 21:12:51
4789
1
原创 从swagger上分组导入接口
导入整个文件可能数据较多,可以自由选择想要导入的接口分组 package com.souche.qa.volvo.utils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import org.apache.http.HttpResponse; import org.apache.http.client.methods.Htt
2020-05-21 22:05:25
440
原创 将swagger接口导出生成测试接口模板
将swagger接口导出生成测试接口模板 思路:根据httpclient请求对返回数据解析,取出需要的字段,之后根据模板新建文件 =public class ReadSwaggerUtil { /** * 根据模板文件将接口和参数填入模板文件,并将每个每个接口生成一个接口测试文件 * * @throws IOException */ @Test public static void createfile() throws IOExcept
2020-05-19 22:15:17
1671
原创 nested exception is org.apache.ibatis.reflection.ReflectionException
nested exception is org.apache.ibatis.reflection.ReflectionException <insert id="insert" useGeneratedKeys="true" keyProperty="id"> INSERT INTO front_category(name, sortno, operator, date_create, date_update)------跟数据库字段一样 VALUES (#{na
2020-05-16 14:20:30
229
原创 开发中遇到的问题 No primary or default constructor found for interface java.util.List
public JsonData insert( String title, Integer type, Integer status, List skuList ) { List skuBoList = PojoUtils.convertList(skuList, SkuBO.class); 报错: No primary or default constructor found for interface java.util.List 原因是list是接口,没有构造函数 换成 ArrayList skuLi
2020-05-15 22:55:25
6428
原创 httpclient post请求
方法一:可以将param放在实体里面 public static String dopostJson(String url, String param, String token) throws IOException { CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost ...
2020-05-07 20:48:02
151
原创 Httpclient get请求
因为有时候get请求不需要入参,所以加了个为空的判断 public static String doget(String url, String param, String token) throws IOException { CloseableHttpClient httpclient = HttpClients.createDefault(); Strin...
2020-05-07 20:45:46
217
原创 写入excel代码优化
写入excel代码优化 上一篇代码不够通用,所以优化了下代码 public class UpdateExcelUtil { public static void updateExcelUtil(File file,List<Map> mapList) throws Exception { FileInputStream fileInputStream = ne...
2020-05-02 11:18:05
272
原创 修改excel单元格数据
1、需要引入的maven依赖 <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.17</version> </dependency> <dependenc...
2020-04-30 11:05:11
320
原创 httpclient请求有file类型
httpclient请求有file类型 1、接口参数类型:File和其他普通类型 2、遇到的问题:开始接口请求一直不通过,提示没有传参,主要问题 请求头中传了错误的Content-Type没有删除** httpGet.setHeader(“Content-Type”, “application/json”); 有file类,需要使用MULTIPART_FORM_DATA builder.addBi...
2020-04-30 10:43:41
2375
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人