- 博客(10)
- 收藏
- 关注
原创 POI工具类
import com.alibaba.fastjson.JSONObject;import org.apache.poi.hssf.usermodel.HSSFRow;import org.apache.poi.hssf.usermodel.HSSFSheet;import org.apache.poi.hssf.usermodel.HSSFWorkbook;import javax...
2018-10-11 10:23:22
702
原创 关于枚举的理解
枚举(enum),是指一个经过排序的、被打包成一个单一实体的项列表。一个枚举的实例可以使用枚举项列表中任意单一项的值。枚举在各个语言当中都有着广泛的应用,通常用来表示诸如颜色、方式、类别、状态等等数目有限、形式离散、表达又极为明确的量。Java从JDK5开始,引入了对枚举的支持。 public class TestEnum {public static void main(String[]...
2018-08-25 23:12:23
970
原创 spring boot 跨域问题
package filter;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.CorsRegistry;import org.springframework.web.servlet.config.annot...
2018-08-14 10:08:50
184
原创 list模拟 实现分页
List<Student> list=new ArrayList<Student>(); list.add(new Student("xx", 12,"男")); list.add(new Student("qq", 18,"男")); list.add(new Student("aa", 20,"
2018-08-06 11:28:03
916
原创 POI
List<Student> list=new ArrayList<Student>(); list.add(new Student("xx", 12,"男")); list.add(new Student("qq", 18,"男")); list.add(new Student("aa", 20,"女"))
2018-07-27 15:01:06
167
原创 使用spring 中的RestTemplate 发送请求 实现httpclient
RestTemplate restTemplate=new RestTemplate(); String s="http://route.showapi.com/"; ResponseEntity<String> responseEntity = restTemplate.getForEntity(s, String.class); ...
2018-07-18 17:00:36
459
原创 用http client 指定url 获取JSON数据并解析
CloseableHttpClient closeableHttpClient = HttpClients.createDefault(); HttpGet httpGet=new HttpGet(url); try { CloseableHttpResponse response = closeableHttpClient.execute(httpGet); String r...
2018-07-14 13:44:25
3716
原创 PageHelper分页
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><link href="https://cdn.bo
2018-06-09 22:35:20
205
原创 SSM集成
在web.xml文件中集成spring框架和读取spring mvc<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schem...
2018-06-08 22:09:31
203
原创 HandlerInterceptor拦截登陆的实现
拦截登陆的实现@Componentpublic class MyHandlerInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler...
2018-06-03 10:35:44
2795
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人