一.说明 SpringBoot框架已经自动封装好json字符串解析,所以我们只需要用它的注解来返回操作就可以了. 二.实战 1.书写一个实体类User,设置属性id和name package com.json; /** * Created by liuya on 2018-01-17. */ public class UserPoJo { private int userId; private String userName; public int getUserId() { return us
Redis部署到阿里云: 下载redis源码,编译,允许远程访问的配置 阿里云安全组设置: SSH连过去: wget http://download.redis.io/releases/redis-4.0.9.tar.gz tar xzf redis-4.0.9.tar.gz cd redis-4.0.9 make 编译完成后cd到目录 vi redis.conf bind改成0.0.0.0 protected-mode改成no daemonize改为no(可选) cd到src目录,运行redi
/** * 获取字符串的长度,如果有中文,则每个中文字符计为2位 * * @param value * 指定的字符串 * * @return 字符串的长度 */ public static int length(String value) { int valueLength = 0; String chinese = "[\u0391-\uFFE5]"; /* 获取字段值的长度,如果含中文字符,则每个中文字符长度为2,否则为1 */ for (int i = 0; i < val
A + B Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 571020 Accepted Submission(s): 181151 Problem Description Calculate A + B. Input Each line will contain two integers A and B. P
不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 34525 Accepted Submission(s): 12493 Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer).杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可
str内部功能详解: class str(object): """ str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer