<dependency>
<groupId>com.rnkrsoft.platform</groupId>
<artifactId>interface-platform-standalone</artifactId>
<version>最新版本号</version>
</dependency>
6.运行maven命令 mvn org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run 或者在idea中运行tomcat7->tomcat7:run启动项目,如果实在不会则编译成war放入tomcat中启动
7.启动后可以用post方式访问http://localhost:80/api,发送请求报文
3.运行maven命令 mvn org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run 或者在idea中运行tomcat7->tomcat7:run启动项目,如果实在不会则编译成war放入tomcat中启动
4.启动后可以用post方式访问http://localhost:80/api,发送请求报文
值得注意的是H2方式启动需要xml如下节点配置。
<!-- 初始化数据表结构 -->
<jdbc:initialize-database data-source="defaultDataSource" ignore-failures="ALL">
<jdbc:script location="classpath:sql/h2/schema.sql" encoding="UTF-8" />
<jdbc:script location="classpath:sql/h2/data.sql" encoding="UTF-8"/>
</jdbc:initialize-database>
{
"channel": "public",//通道号
"txNo": "000", //交易码
"version": "1",//版本号
"sessionId": "1234567890", //会话号
"uid": null, //用户号
"uic": null, //用户设备识别码
"deviceManufacturer":"xiaomi",
"deviceModel":"S2",
"deviceType":"Android",
"osVersion":"6.1.2",
"appVersion":"1.0.0",
"timestamp": "20180724155700743", //发送请求的时间戳
"token": "", //TOKEN令牌
"sign": "", //data对应的签字信息
"lng": 0.0, //经度
"lat": 0.0 //纬度
"data": "{}", //业务对象序列化的JSON字符串 例如:LoginRequest
}
{
"data": "{}", //业务对象序列化的JSON字符串 例如:LoginResponse
"sign": "", //data对应的签字信息
"code": "000", //通信层应答代码
"desc": "通信成功" //通信层应答描述
}
java原生调用
https://github.com/rnkrsoft/interface-platform-client4j-demo
spring集成调用
https://github.com/rnkrsoft/interface-platform-client4j-spring-demo