Cloud Foundry学习
摘要:很多中文文章:http://vmware.csdn.net/second.html?regionid=1709英文的:http://docs.cloudfoundry.com/tags/tutorial.htmlCloud Foundry可以发布java web应用,java独立应用。它其实就是一个虚拟机,只不过是可以发送一条命令就会自动往里面安装各种软件,jdk,j2ee就是其中的一种软件。目前我申请的那个帐号里面有2G的空间,512M的内存,4核CPU。这点免费空间也不好找啊。呵呵四篇入门文章:http://cnblog.cloudfoundry.com/2012/06/30/69/htt
阅读全文
posted @
2013-01-18 16:48
yoyo002
阅读(333)
推荐(0) 编辑
Jersey+Jackson为jaxb输出json
摘要:Jersey默认的json会对attribut前面加上@符号,SO,查了好久发现可以通过Jackson作为json的输出。jackson实现了json序列化的接口javax.ws.rs.ext.MessageBodyReader, javax.ws.rs.ext.MessageBodyWriter, org.codehaus.jackson.Versioned步骤1、下载jackson2、配置web.xml<init-param> <param-name> com.sun.jersey.config.property.packages </...
阅读全文
posted @
2013-01-05 21:41
yoyo002
阅读(2754)
推荐(0) 编辑
Jersey Delete请求发送请求体
摘要:要使用带有RequestEntity的Delete请求,需要使用如下请求方式client.asyncResource(pointer+url+"/features?clear="+clear).delete(filter);而不能使用普通的:client.resource(pointer+url+"/features?clear="+clear).delete(filter);否则会报类似如下错误: java.net.ProtocolException: HTTP method DELETE doesn't support output信息来源:
阅读全文
posted @
2013-01-03 16:41
yoyo002
阅读(1461)
推荐(0) 编辑
jersey客户端返回List的两种方式
摘要:jersey客户端返回List的两种方式:前提是服务端的rest实现需要返回list对象1) Using array: Client c = ... Token[] ts = c.resource(...).path(...).get(Token[].class);2) Using the the class com.sun.jersey.api.client.GenericType to ensure that generic type information is retained: List<Token>[] ts = c.resource(...).path(...).ge
阅读全文
posted @
2013-01-03 10:02
yoyo002
阅读(1110)
推荐(0) 编辑