摘要: 代码: public static void main(String[] args) { //把要插入的表的有效字段都封装到一个map中 Map<String, Object> objMap = new HashMap<>(); objMap.put("name", "xiaoming"); obj 阅读全文
posted @ 2021-02-19 10:28 zagwk 阅读(441) 评论(0) 推荐(0)
摘要: OutputStream output; try { output = response.getOutputStream(); //清空缓存 response.reset(); //定义浏览器响应表头,顺带定义下载名,比如students(中文名需要转义) String s = file.getNa 阅读全文
posted @ 2020-12-01 10:07 zagwk 阅读(4027) 评论(0) 推荐(0)
摘要: response 设置响应头的常用几种方法 1.Location 的用法 response.setStatus(302)//临时定向响应码 response.setHeader("Location", "/day03_00_ResponseHeader/servlet/ResponseHeaderD 阅读全文
posted @ 2020-11-30 09:43 zagwk 阅读(2630) 评论(0) 推荐(0)
摘要: 为了方便广大的开发者,特此统计了网上诸多的免费API,为您收集免费的接口服务,做一个api的搬运工,以后会每月定时更新新的接口。有些接口来自第三方,在第三方注册就可以成为他们的会员,免费使用他们的部分接口。 百度AccessToken:针对HTTP API调用者,百度AIP开...——接口地址语音识 阅读全文
posted @ 2020-11-21 15:38 zagwk 阅读(1971) 评论(0) 推荐(1)
摘要: isEmpty(String str) 是否为空,空格字符为false isNotEmpty(String str) 是否为非空,空格字符为true isBlank(String str) 是否为空,空格字符为true isNotBlank(String str) 是否为非空,空格字符为false 阅读全文
posted @ 2020-11-21 11:48 zagwk 阅读(124) 评论(0) 推荐(0)
摘要: 创建 Excel 表格 public void outExcel(Integer fileId, HttpServletResponse response){ //根据文件id查询档案对象 XzFile file = xzFileMapper.getFileById(fileId); if (fil 阅读全文
posted @ 2020-11-20 17:03 zagwk 阅读(2059) 评论(0) 推荐(1)
摘要: 工具类 package org.jeecg.modules.util; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org 阅读全文
posted @ 2020-11-20 14:00 zagwk 阅读(259) 评论(0) 推荐(0)
摘要: /** * 批量下载证件照、文件 * * @return */ @GetMapping("/downLoadImgs") @Transactional public void downLoadImgs(HttpServletRequest request,@RequestParam(name = " 阅读全文
posted @ 2020-11-14 09:34 zagwk 阅读(678) 评论(0) 推荐(0)
摘要: 前端传递了Base64编码的文件后,将文件保存进本地或者服务器,并将文件的名称进行重新命名的工具类 package com.xz.util; import org.springframework.web.multipart.MultipartFile; import sun.misc.BASE64D 阅读全文
posted @ 2020-08-15 17:12 zagwk 阅读(1001) 评论(0) 推荐(0)
摘要: <insert id="add" parameterType="EStudent" useGeneratedKeys="true" keyProperty="id"> insert into TStudent(name, age) values(#{name}, #{age}) </insert> 阅读全文
posted @ 2020-08-07 10:15 zagwk 阅读(212) 评论(0) 推荐(0)