Appearance
PropsUtil
shell
Props props = PropsUtil.get("config/application.properties");
String host = props.getStr("spring.redis.host");
Integer port = props.getInt("spring.redis.port");
//环境西悉尼
String active = props.getStr("spring.profiles.active", "dev");
HttpUtil
上传文件
shell
MultiResource resources = new MultiResource(new InputStreamResource(file.getInputStream(), file.getOriginalFilename()));
Map<String, Object> params = MapUtil.of("file", resources);
String body = HttpRequest.post("http://xxx/xxx")
.header("Token", "xxx")
.form(params).execute().body();
下载文件
shell
HttpUtil.downloadFile()
ExcelUtil
shell
ExcelReader reader = ExcelUtil.getReader(file.getInputStream(), 0);
List<List<Object>> read = reader.read();
List<List<Object>> dataList = read.stream().filter(objects -> objects.get(0) instanceof Long).toList();