mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 20:57:23 +08:00
refactor: 优化字符串模板方法 API 使用
This commit is contained in:
@@ -70,7 +70,7 @@ public class ExcelUtils {
|
||||
Class<T> clazz,
|
||||
HttpServletResponse response) {
|
||||
try {
|
||||
String exportFileName = URLUtil.encode(String.format("%s_%s.xlsx", fileName, DateUtil
|
||||
String exportFileName = URLUtil.encode("%s_%s.xlsx".formatted(fileName, DateUtil
|
||||
.format(new Date(), DatePattern.PURE_DATETIME_PATTERN)));
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + exportFileName);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
|
Reference in New Issue
Block a user