过眼云眼
Sun空指针
出来混,迟早是要还的。
展开
-
根据key值,list排序
public JSONArray getSortJson(JSONArray jsonArray, String keyName) { JSONArray sortedJsonArray = new JSONArray(); List<JSONObject> jsonValues = new ArrayList<JSONObject>();...翻译 2016-09-02 16:37:42 · 420 阅读 · 0 评论 -
[spring_cloud] 配置config服务搭建
1、首先使用idea工具快速创建springboot工程,在pom.xml包中引入以下依懒 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-net...翻译 2019-06-06 16:16:52 · 205 阅读 · 0 评论 -
[spring_cloud] 网关zuul服务搭建
1、首先使用idea工具快速创建springboot工程,在pom.xml包中引入以下依懒 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-net...翻译 2019-06-06 16:07:10 · 155 阅读 · 0 评论 -
[spring_cloud] eureka服务搭建
1、首先使用idea工具快速创建springboot工程,在pom.xml包中引入以下依懒 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netf...翻译 2019-06-06 15:53:14 · 124 阅读 · 0 评论 -
myEclipse在线生成注册码
在百度中打开下面地址,即可: http://key.858game.com/翻译 2016-02-29 13:27:12 · 2679 阅读 · 0 评论 -
使用java代码判断用户使用哪种方式登录的。
<#--判断是哪种登录方式--> var agent = navigator.userAgent.toLowerCase(); var res = agent.match(/android/); if(res == "android"){ alert("android"); } res = ag...原创 2015-09-08 14:15:23 · 901 阅读 · 0 评论 -
在java类中模仿表单提交
public static String[] operateFormSubmit(String url,Map<String, String> params){String[] ret=new String[2];StringBuffer sb=new StringBuffer();String parameterUtil=getParams(params,"utf-8");s...原创 2015-09-10 14:54:18 · 553 阅读 · 0 评论 -
在web中生成相应的二维码
第一种方法: <img src="http://qrcoder.sinaapp.com?t=http://www.baidu.com" style="width:150px; height=150px;">第二种方法: 首先引入:query.qrcode.min.js 其次,根据二维码所要显示的位置(id=qrcode) 如下: ...翻译 2015-10-15 15:41:24 · 452 阅读 · 0 评论 -
数组转集合,集合转数组
一、数组转集合: String[] array={"1","2","3","4"}; List<String> list = Arrays.asList(array); List arrList = new ArrayList(list); arrList.add("5");二、集合转数组: ...翻译 2016-04-06 13:59:40 · 7597 阅读 · 2 评论 -
两个日期之间的相差几个月,精确到天。
String endDate="20160908"; String startDate="20160708"; int result=0; int yearToMonth = (Integer.parseInt(endDate.substring(0, 4)) - Integer.parseInt(startDate.substring(0, 4))) * 12; int monthT...原创 2016-08-30 14:17:34 · 1822 阅读 · 1 评论 -
json和xml解析常用代码
--json解析 JSONObject jsonObject = JSONObject.fromObject(sjson);JSONObject jsonDate = jsonObject.getJSONObject("data");--获取json,集合JSONArray modelsDetail = jsonDate.getJSONArray("detailList");--遍历集...原创 2016-09-02 16:35:28 · 311 阅读 · 0 评论 -
[spring_cloud] 创建一个简单的客户端client
1、首先使用idea工具快速创建springboot工程,在pom.xml包中引入以下依懒 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-net...翻译 2019-06-06 16:26:33 · 657 阅读 · 0 评论