代码拉取完成,页面将自动刷新
同步操作将从 悟耘开源/lemur-http 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#requestProxy requestProxy 是为了把 http,以及webserver 的简单请求进行封装,做到接口化操作http接口 快速开发,高效完成
作者博客:http://blog.csdn.net/qjueyue
作者邮箱:qrb.jueyue@gmail.com
QQ群: 364192721
###作用:
###使用方法:
1.配置httpclient和spring 融合,这个网上比较多
2.写接口与参数
3.注入调用接口
###适用项目:
与其他项目进行交互,调用地方接口较多的项目
使用连接池,对象返回复杂
###支持返回类型:
String,int,long,double
bean
list<bean>
###版本修改
2.0.0
1.6.1
1.6.2
<!-- 注册 HTTP请求动态代理接口 -->
<bean class="com.onepiece.requestproxy.factory.RequestBeanScannerConfigurer">
<property name="basePackage" value="com.jueyue.onepiece.test.request">
</property><!--符合了spring的写法-->
</bean>
###demo 可以轻松设置一写基础参数,调用httpclient属性,接口化调用网络接口
@IRequest("testRequest")
public interface ITestRequest {
@IRequestMethod(type = RequestTypeEnum.GET, url = "http://api.map.baidu.com/telematics/v3/weather")
String testGet(@IRequestParam("location") String location,
@IRequestParam("output") String output,
@IRequestParam("ak") String ak);
@IRequestMethod(type = RequestTypeEnum.GET, url = "http://api.map.baidu.com/telematics/v3/weather")
BaiduWeatherEntity testGetEntity(
@IRequestParam("location") String location,
@IRequestParam("output") String output,
@IRequestParam("ak") String ak);
@IRequestMethod(connectTimeout = 120, url = "http://open.ikamobile.cn:8391/pur/train/number.json", type = RequestTypeEnum.GET)
public String queryTrainSchedule(
@IRequestParam("from_station_name") String fromStationName,
@IRequestParam("to_station_name") String toStationName,
@IRequestParam("date") String date,
@IRequestParam("train_type") String trainType);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。