`
conkeyn
  • 浏览: 1506635 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论
文章列表

post json

    博客分类:
  • Java
方法一: public static String doPostJson(String interfaceUrl, Object jsonObject) throws Exception { String encoding = "UTF-8"; String contentType = "application/json"; String requestMethod = "POST"; Gson gson = new Gson(); String stringJson = gson.toJson(jso ...
借用别的类的方法 /** * Created by Administrator on 2015/12/23. */ //====================借用方法=============================== function borrowMethods(borrowFrom,addTo){ var from = borrowFrom.prototype; var to = addTo.prototype; for(m in from){ if(typeof from[m]!="function&q ...
声明父类与子类的示例: /** * Created by Administrator on 2015/12/23. */ //声明Rectangle类 function Rectangle(w, h) { this.width = w; this.height = h; } Rectangle.prototype.area = function () { return this.width * this.height; } //父类定义了toString()方 ...
http://zhidao.baidu.com/link?url=JNzgRxFtj8d7dsOuvRzT025b8r0dvRMNtYp_YExQur_hIJz9Iqm175EZC7FviHD85ocLKvIyTgZTG6Gy9sVvwq 右建打开文本编辑器   Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\EmEditor] @="EmEditor" [HKEY_CLASSES_ROOT\*\shell\EmEditor\command] @="c:\\Program ...
1、先参考《CentOS下安装rvm、ruby》将ruby安装起来。 2、安装ruby redis工具   gem install redis  3、如果出现以下错误,那么确认一下《CentOS下安装rvm、ruby》的第5点是否正常配置 ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/quick/Marshal.4.8/ ...
1、安装的工具包 yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison sqlite-devel iconv-devel  2、安装rvm(ruby管理工具)   [root@mail ~]# curl -L get.rvm.io | bash -s stable  如果遇到以下错误:     Warning, RVM 1.26 ...
第一步:利用maven-jar-plugin生成当前工程的jar,该jar包包含manifest的main-class和class-path参数。 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.6</version> <configuration> <archive> <manifes ...
1、applicationContext-base.xml   <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quo ...
首先是pom.xml <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> & ...
d   import java.io.IOException; import org.apache.commons.lang.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonTokenId; import com.fasterxml.jackson.databind.DeserializationContext; ...

JsonObjectMapper

    博客分类:
  • Java
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; /** ...
    public class ZeusWebApplicationInitializer implements WebApplicationInitializer { public void onStartup(ServletContext container) { WebApplicationContext rootContext = WebApplicationContextUtils.getWebApplicationContext(container); if (rootContext == null) { rootContext = ...
    1、遇到Producer connection to hostname:9092 unsuccessful   14/12/29 11:57:39 INFO utils.VerifiableProperties: Verifying properties 14/12/29 11:57:39 INFO utils.VerifiableProperties: Property metadata.broker.list is overridden to master001:9092,master001:9092 14/12/29 11:57:39 INFO utils.Verif ...
1、3888端口一直无法连接上   -04 00:06:50,339 [myid:] - INFO [main:QuorumPeerConfig@103] - Reading configuration from: /home/conkeyn/zookeeper-3.4.6/bin/../conf/zoo.cfg 2014-12-04 00:06:50,344 [myid:] - WARN [main:QuorumPeerConfig@293] - No server failure will be tolerated. You need at least 3 servers. 2 ...
本文参考自:http://flashing.iteye.com/blog/1797531 1.如果远程客户端网络状况不是太好,比如adsl什么的,那么一定在客户端打开requstedHeartbeat2.如果在同一台机器上,千万不要打开requstedHeartbeat,即requstedHeartbeat=03.各个系统下配置文件的位置:Windows - %APPDATA%\RabbitMQ\rabbitmq.configDebian - /etc/rabbitmq/rabbitmq.configRPM - /etc/rabbitmq/rabbitmq.configMacOS (Mac ...
Global site tag (gtag.js) - Google Analytics