Commit 18f925d6ed4aa821d02364721d356f3ba72208d5
Committed by
GitHub
Merge pull request #2443 from thingsboard/feature/rest-client-improvement-3.0
Feature/rest client improvement 3.0
Showing
7 changed files
with
68 additions
and
4 deletions
... | ... | @@ -221,6 +221,11 @@ |
221 | 221 | <scope>test</scope> |
222 | 222 | </dependency> |
223 | 223 | <dependency> |
224 | + <groupId>org.thingsboard</groupId> | |
225 | + <artifactId>rest-client</artifactId> | |
226 | + <scope>test</scope> | |
227 | + </dependency> | |
228 | + <dependency> | |
224 | 229 | <groupId>org.springframework.boot</groupId> |
225 | 230 | <artifactId>spring-boot-starter-test</artifactId> |
226 | 231 | <scope>test</scope> | ... | ... |
... | ... | @@ -38,7 +38,7 @@ import org.junit.rules.TestRule; |
38 | 38 | import org.junit.rules.TestWatcher; |
39 | 39 | import org.junit.runner.Description; |
40 | 40 | import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; |
41 | -import org.thingsboard.client.tools.RestClient; | |
41 | +import org.thingsboard.rest.client.RestClient; | |
42 | 42 | import org.thingsboard.server.common.data.Device; |
43 | 43 | import org.thingsboard.server.common.data.EntityType; |
44 | 44 | import org.thingsboard.server.common.data.id.DeviceId; | ... | ... |
... | ... | @@ -106,6 +106,7 @@ |
106 | 106 | <module>tools</module> |
107 | 107 | <module>application</module> |
108 | 108 | <module>msa</module> |
109 | + <module>rest-client</module> | |
109 | 110 | </modules> |
110 | 111 | |
111 | 112 | <profiles> |
... | ... | @@ -434,6 +435,12 @@ |
434 | 435 | </dependency> |
435 | 436 | <dependency> |
436 | 437 | <groupId>org.thingsboard</groupId> |
438 | + <artifactId>rest-client</artifactId> | |
439 | + <version>${project.version}</version> | |
440 | + <scope>test</scope> | |
441 | + </dependency> | |
442 | + <dependency> | |
443 | + <groupId>org.thingsboard</groupId> | |
437 | 444 | <artifactId>dao</artifactId> |
438 | 445 | <version>${project.version}</version> |
439 | 446 | <type>test-jar</type> | ... | ... |
rest-client/pom.xml
0 → 100644
1 | +<!-- | |
2 | + | |
3 | + Copyright © 2016-2020 The Thingsboard Authors | |
4 | + | |
5 | + Licensed under the Apache License, Version 2.0 (the "License"); | |
6 | + you may not use this file except in compliance with the License. | |
7 | + You may obtain a copy of the License at | |
8 | + | |
9 | + http://www.apache.org/licenses/LICENSE-2.0 | |
10 | + | |
11 | + Unless required by applicable law or agreed to in writing, software | |
12 | + distributed under the License is distributed on an "AS IS" BASIS, | |
13 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | + See the License for the specific language governing permissions and | |
15 | + limitations under the License. | |
16 | + | |
17 | +--> | |
18 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
19 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
20 | + <modelVersion>4.0.0</modelVersion> | |
21 | + <parent> | |
22 | + <groupId>org.thingsboard</groupId> | |
23 | + <version>3.0.0-SNAPSHOT</version> | |
24 | + <artifactId>thingsboard</artifactId> | |
25 | + </parent> | |
26 | + <artifactId>rest-client</artifactId> | |
27 | + <packaging>jar</packaging> | |
28 | + | |
29 | + <name>Thingsboard Rest Client</name> | |
30 | + <url>https://thingsboard.io</url> | |
31 | + | |
32 | + <properties> | |
33 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
34 | + <main.dir>${basedir}/..</main.dir> | |
35 | + </properties> | |
36 | + | |
37 | + <dependencies> | |
38 | + <dependency> | |
39 | + <groupId>org.thingsboard.common</groupId> | |
40 | + <artifactId>data</artifactId> | |
41 | + </dependency> | |
42 | + <dependency> | |
43 | + <groupId>org.springframework</groupId> | |
44 | + <artifactId>spring-web</artifactId> | |
45 | + </dependency> | |
46 | + </dependencies> | |
47 | + | |
48 | +</project> | ... | ... |
rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java
renamed from
tools/src/main/java/org/thingsboard/client/tools/RestClient.java
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | -package org.thingsboard.client.tools; | |
16 | +package org.thingsboard.rest.client; | |
17 | 17 | |
18 | 18 | import com.fasterxml.jackson.databind.JsonNode; |
19 | 19 | import com.fasterxml.jackson.databind.ObjectMapper; |
... | ... | @@ -31,7 +31,7 @@ import org.springframework.http.client.support.HttpRequestWrapper; |
31 | 31 | import org.springframework.util.StringUtils; |
32 | 32 | import org.springframework.web.client.HttpClientErrorException; |
33 | 33 | import org.springframework.web.client.RestTemplate; |
34 | -import org.thingsboard.client.tools.utils.RestJsonConverter; | |
34 | +import org.thingsboard.rest.client.utils.RestJsonConverter; | |
35 | 35 | import org.thingsboard.server.common.data.AdminSettings; |
36 | 36 | import org.thingsboard.server.common.data.ClaimRequest; |
37 | 37 | import org.thingsboard.server.common.data.Customer; | ... | ... |
rest-client/src/main/java/org/thingsboard/rest/client/utils/RestJsonConverter.java
renamed from
tools/src/main/java/org/thingsboard/client/tools/utils/RestJsonConverter.java
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | -package org.thingsboard.client.tools.utils; | |
16 | +package org.thingsboard.rest.client.utils; | |
17 | 17 | |
18 | 18 | import com.fasterxml.jackson.databind.JsonNode; |
19 | 19 | import org.springframework.util.CollectionUtils; | ... | ... |