会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
samcheng
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2018年2月1日
spring boot 邮件发送
摘要: 1.首先开启邮件传输协议SMTP协议,设定授权登陆密码。 2.添加gradle依赖:compile('org.springframework.boot:spring-boot-starter-mail') 3.自动化配置,在application.properties中配置相应的属性内容。
阅读全文
posted @ 2018-02-01 17:41 samcheng
阅读(205)
评论(0)
推荐(0)
2018年1月24日
Criteria
摘要: http://blog.csdn.net/qq_16313365/article/details/4204448 http://blog.sina.com.cn/s/blog_e2c74e2a0101t9nb.html Restrictions用法: 方法说明 方法 说明 Restrictions.
阅读全文
posted @ 2018-01-24 10:18 samcheng
阅读(828)
评论(0)
推荐(0)
2017年12月1日
StringEscapeUtils对字符进行各种转义
摘要: apache工具包common-lang中有一个很有用的处理字符串的工具类,其中之一就是StringEscapeUtils,这个工具类是在2.3版本以上加上的去的,利用它能很方便的进行html,xml,java等的转义与反转义
阅读全文
posted @ 2017-12-01 09:09 samcheng
阅读(226)
评论(0)
推荐(0)
2017年11月17日
Json与List的相互转换
摘要: 谷歌的Gson.jar: //list转换为json Gson gson = new Gson(); List<Person> persons = new ArrayList<Person>(); String str = gson.toJson(persons); //json转换为list Gs
阅读全文
posted @ 2017-11-17 09:11 samcheng
阅读(7571)
评论(0)
推荐(0)
2017年11月14日
本地时间转UTC时间
摘要: public class Test { public long stringToLongDate(String str) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"
阅读全文
posted @ 2017-11-14 19:44 samcheng
阅读(3469)
评论(0)
推荐(0)
2017年8月28日
idea设置运行当前工程的目录
摘要: 点击idea右上角的运行主函数的按钮,点击Edit Configurations, 点击Working directory可以在上面更改目录,也可直接点击最后面对应的小图标,选择MODULE_DIR。
阅读全文
posted @ 2017-08-28 16:26 samcheng
阅读(9798)
评论(0)
推荐(0)
2017年7月25日
Http请求头与响应头
摘要: http://blog.csdn.net/javandroid/article/details/29884033
阅读全文
posted @ 2017-07-25 17:59 samcheng
阅读(124)
评论(0)
推荐(0)
2017年7月23日
获取ip位置方法
摘要: 1.https://www.opengps.cn/Data/IP/LocHighAcc.aspx(精确到大致位置) 2.https://www.iplocation.net(国外的) 3.http://www.ip138.com(国内的)
阅读全文
posted @ 2017-07-23 06:24 samcheng
阅读(889)
评论(0)
推荐(0)
2017年7月12日
简单的Http Server实现
摘要: 思路: 1.创建一个ServerSocket对象。 2.调用ServerSocket对象的accept方法,等待连接,连接成功会返回一个socket对象,否则一直阻塞等待。 3.从Socket对象中获取InputStream与OutputStream字节流,这两个流分别对应request请求与res
阅读全文
posted @ 2017-07-12 16:49 samcheng
阅读(660)
评论(0)
推荐(0)
TCP/IP各层对应的协议
摘要:
阅读全文
posted @ 2017-07-12 12:06 samcheng
阅读(653)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告