by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(==防止爬虫==):http://blog.liuyingguang.cn
前提:jenkins是装在CentOS6.7中,同时,我的这台linux上面安装有docker
项目主要是jersey 1.x 版本的maven项目,重点在与我在项目中放置了tomcat,以及使用maven对tomcat进行解压,并将项目打包的文件放置到项目中,那么项目信息就不多写了,把maven配置信息重点写出来吧:
<build> <finalName>testjersey</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.2</version> <executions> <execution> <id>copy-package</id> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <unzip dest="target/apache/"> <fileset dir="${basedir}"> <include name="apache-tomcat-7.0.68.zip" />
public void normalTest()throws Exception, IOException{
CloseableHttpClient httpclient = HttpClients.createDefault();
JAXBContext context = JAXBContext.newInstance("org.xwiki.rest.model.jaxb");
Unmarshaller unmarshaller = context.createUnmarshaller();
HttpUriRequest httpPost = RequestBuilder.get()
.setUri(new URI("http://172.16.200.220:8082/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome"))
.setHeader("Accept", "application/xml").build();
CloseableHttpResponse response = httpclient.execute(httpPost);
System.out.println(response.getEntity());
HttpEntity responseEntity=response.getEntity();
Page page = (Page) unmarshaller.unmarshal(responseEntity.getContent());
System.out.println(new Gson().toJson(page));
}
public void testLogin() throws Exception{
CloseableHttpClient httpclient =
源文件:https://github.com/TykTechnologies/tyk-swagger-definitions/blob/master/tyk_gateway_api.yml
swagger: '2.0' info: version: "1.9" title: Gateway REST API paths: /tyk/keys/: get: description: | Gets a list of *key* IDs (will only work with non-hashed installations) parameters: - name: api_id in: query description: Back-end to target required: true type: string format: string - name: x-tyk-authorization in: header description: tyk gateway shared secret required: true type: string format: string responses: 200: description: Successful response schema: type: object properties: keys: type: array items: type: string /tyk/keys/create: post: description: | Create a n