- 博客(7)
- 收藏
- 关注
原创 SimpleDateFormat多线程下不安全的处理
//为每一个线程创建副本private static ThreadLocal<Map<String,SimpleDateFormat>> threadLocal = new ThreadLocal(){ @Override protected Object initialValue() { return new HashMap<St...
2019-03-26 11:01:48
241
原创 文件下载2
@RequestMapping(value="/export",method=RequestMethod.GET)public ResponseEntity<byte[]> test(HttpServletRequest request) throws Exception { FileInputStream fileInputStream = new FileI...
2019-01-22 12:18:02
247
原创 文件下载解决中文文件名无法显示问题
中文文件名需要用URL编码public static HttpServletResponse download(String path, HttpServletResponse response) { try { File file = new File(path); String filename = file.getName(); Input...
2019-01-22 12:13:12
1095
原创 文件下载方法
记录自己碰到的问题:public static HttpServletResponse download(String path, HttpServletResponse response) { try { File file = new File(path); String filename = file.getName(); InputStrea...
2019-01-17 14:31:45
520
原创 springMVC接收js数组对象
前端var ids =new Array();ids.push(1);ids.push(2);console.log(ids);$.ajax({ url: '/erp/user/test', type: 'GET', data: {ids:ids}, dataType: 'json', success: function (data) { ...
2018-12-26 11:24:19
1141
原创 SpringMVC接收Date类型参数
在Controller中添加一个数据绑定方法:注:只在当前Controller中生效 @InitBinderpublic void initBinder(ServletRequestDataBinder bin){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); CustomDa...
2018-11-26 15:07:48
1219
原创 小白实习面试中碰到的一些问题
-------------------------------------servlet---------------------------------------------------------Servlet是web服务器的补充,需要用相应的运行环境,如tomcat(容器)servlet的生命周期 实例化 初始化init 调用service 销毁destroyse...
2018-11-20 15:58:40
571
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅