自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 Future设计模式

1.手动实现和jdk1.5实现package com.es.Demo;import java.util.concurrent.*;// future设计模式:当某个业务耗时较长,但是主线程不想等待这个业务执行完毕,需要执行其他业务时.可以// Future模式的客户端在得到这个返回结果后并不急于对其进行处理而是调用其他业务逻辑,充分利用等待时间,// 这就是Future模式的核心所在。在完成其他业务处理后,最后再使用返回比较慢的Future数据。这样在整个调用中就不存在无谓的等待,充分利用所有

2020-11-12 21:51:51 111

原创 springboot获取请求映射路径(url)

1.sprongboot获取所有的url和对应类和方法以及请求类型 代码如下:package com.es.config;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.sprin

2020-07-03 00:02:48 9512

原创 获取IP地址工具类

IP地址工具类package com.cy.pj.common.util;import javax.servlet.http.HttpServletRequest;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.util.StringUtils;import org.springframework.web.context.request.RequestContextHolder

2020-07-02 23:18:01 144

原创 java实现文件下载

代码如下 :import org.springframework.util.StringUtils;import javax.servlet.ServletOutputStream;import javax.servlet.http.HttpServletResponse;import java.io.*;public class UploadFile { /* 文件下载 @param filepath 文件路径 */ public

2020-06-28 00:00:06 131

原创 基于springboot的springmvc国际化

基于springboot的springmvc国际化1. 重写springmvc区域解析器import org.springframework.web.servlet.LocaleResolver;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import java.util.Locale;// 国际化 重写解析器public class MyLocaleRe

2020-06-27 23:56:03 160

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除