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

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

相关推荐
AI人工智能+电脑小能手5 分钟前
【大白话说Java面试题】【Java基础篇】第7题:HashMap的get流程是什么
java·后端·面试·哈希算法·散列表·hash-index·hash
我头发多我先学35 分钟前
C++ 模板全解:从泛型编程初阶到特化、分离编译进阶
java·开发语言·c++
JMchen12335 分钟前
第 3 篇|Android 项目结构解析与第一个界面 —— Hello, CSDN!
android·android studio·android 零基础·android 项目结构·android 界面开发
mfxcyh1 小时前
使用MobaXterm配置nginx
java·服务器·nginx
木叶子---1 小时前
Spring 枚举转换器冲突问题分析与解决
java·python·spring
standovon1 小时前
SpringSecurity的配置
java
霸道流氓气质1 小时前
SpringBoot+LangChain4j+Ollama+RAG(检索增强生成)实现私有文档向量化检索回答
java·spring boot·后端
就叫飞六吧1 小时前
Docker Hub 上主流的nginx发行
java·nginx·docker
MiNG MENS1 小时前
基于SpringBoot和Leaflet的行政区划地图掩膜效果实战
java·spring boot·后端
2601_949814692 小时前
Spring Boot中的404错误:原因、影响及处理策略
java·spring boot·后端