JMeter之上传文件同时带有参数

文章目录

业务场景

针对下述接口构建jmeter测试,这是个post接口,在上传文件file的同时指定变量groupId的值

java 复制代码
	 @PostMapping("/importExcel")
    public ApiResultDto<String> importExcel(TagChildrenImportDto importDto) {
        SecurityUser user = SecurityUtils.getCurrentUser();
        return tagService.importExcel(importDto, user);
    }
    	
	public class TagChildrenImportDto {
	    @Schema(name = "file", description = "文件")
	    private MultipartFile file;
	    @Schema(name = "groupId", description = "分组id")
	    private UUID groupId;
	}
}

使用

在《参数》指定groupId,

在《文件上传》指定file

坑

当《参数》模块有值的时候,《消息体数据》是无法点击的!必须要把《参数》模块的数据删除才能点击"消息体数据"

相关推荐
皮皮林5518 小时前
为什么越来越多人用 Spring AI ?
spring
好的佩奇8 小时前
蓝牙之设备角色与连接
android·flutter·蓝牙
兴趣互联8 小时前
jeecgboot nacos2.3.2 使用pgsql
java
hudd6689 小时前
JavaEE 初阶 - 文件操作和IO
java·开发语言·java-ee
Flynn Liang9 小时前
HikariCP 连接池不是越大越好:I/O 密集型 Java 服务的数据库容量工程
java·数据库·mysql·高并发·连接池·hikaricp·sql 优化
学长毕设10 小时前
基于SpringBoot社区快递驿站物流配送系统-附源码
java·spring boot·后端
Flynt10 小时前
Java4Shell 实测:EPYC 一跑就中招,关掉 Base64 硬件加速,1KB 解码慢 14 倍
java·安全·性能优化
Resean022310 小时前
Spring 源码分析(七)AOP 原理(上):代理的创建
java·后端·spring
Tangq一定可以的11 小时前
Spring AI Advisor 详解 - 给大模型调用加上“切面“,日志/过滤/记忆一键搞定
java·后端·spring
小巫编程室11 小时前
我造了一个 Java 能力包:让 AI 直接调用你的业务代码
java·前端·后端