![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Resteasy
earthhour
这个作者很懒,什么都没留下…
展开
-
JBOSS7下部署服务(一):EJB3集成Resteasy
1、创建local接口类IHelloWorldLocalpackage com.ejb.hello;import javax.ejb.Local;import javax.ws.rs.Consumes;import javax.ws.rs.GET;import javax.ws.rs.Path;import javax.ws.rs.PathParam;import javax原创 2013-09-26 14:15:51 · 3191 阅读 · 0 评论 -
调用rest地址时异常:Invalid use of BasicClientConnManager: connection still allocated.
Caused by: java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated. Make sure to release the connection before allocating another one.使用Resteasy进行restful原创 2015-02-02 11:52:38 · 7049 阅读 · 0 评论 -
RESTful获取url参数及直接映射pojo
1、url示例:?from=10&to=20@QueryParam("from") int原创 2014-07-05 23:05:05 · 4273 阅读 · 0 评论 -
dojo表单提交的处理:表单转为json提交,json值绑定到vo类
1、定义dojo formform中的元素必须有name属性,例如2、表单转为json,提交 function submit(){ var url = "/rest/auth/addUser"; require(["dojo/request/xhr", "dojo/dom-form"], function(xhr, domForm){ xhr原创 2014-02-10 11:49:37 · 2679 阅读 · 0 评论 -
JsonMappingException: failed to lazily initialize及could not initialize异常
异常:Caused by: org.codehaus.jackson.map.JsonMappingException: failed to lazily initialize a collection of role: com.a.b, no session or session was closed (through reference chain: java.util.ArrayList[0原创 2014-01-16 18:54:26 · 1866 阅读 · 0 评论 -
Unable to scan WEB-INF for JAX-RS annotations
严重: Exception sending context initialized event to listener instance of class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrapjava.lang.RuntimeException: Unable to scan WEB-INF for JAX-RS原创 2014-02-11 18:44:49 · 3027 阅读 · 0 评论 -
Resteasy的rest url配置
例如:http://127.0.0.1:8080/DemoTest/rest/hello/say这样的url是怎么构成的?http://127.0.0.1:8080/ ——这部分不用说了,JBoss提供服务的地址DemoTest/ ——来自JBoss下部署的war包的名称DemoTest.warrest/ ——原创 2013-12-12 12:19:00 · 2132 阅读 · 0 评论 -
解决:Rest类无法取得HTTP PUT请求发送的参数
rest类通过String id = request.getParameter("id");可以取得url传递过来的id参数值但是,Put中的参数无法取得,如下以下内容来自:http://dbscx.iteye.com/blog/828167PUT和POST的定义: 使用PUT和POST插入新资源方面所起的作用的争议。HTTP1.1协议中都有新增和更新的定义转载 2013-11-25 11:29:32 · 9918 阅读 · 0 评论 -
调用ejb+Resteasy的rest服务报错:Could not find MessageBodyWriter
Could not find MessageBodyWriter for response object of type: java.util.ArrayList解决办法:war包要包含提供rest服务的ejb LOCAL接口类我的打包参考:1、build.ejblocal.xml片段 说明:IHello原创 2013-11-04 22:29:38 · 5756 阅读 · 0 评论 -
resteasy拦截器,拦截rest请求,修改response header内容
只拦截GET请求,并修改header中的内容反馈给客户端import java.io.IOException;import java.lang.reflect.Method;import javax.ws.rs.GET;import javax.ws.rs.WebApplicationException;import javax.ws.rs.ext.Provider;import转载 2015-09-04 12:19:38 · 9894 阅读 · 0 评论