Commit 3c20546d5fde12880ded1644a5600e396224de48

Authored by YevhenBondarenko
Committed by Andrew Shvayka
1 parent 3f0cd0d5

move rest-client to own module

@@ -90,6 +90,10 @@ @@ -90,6 +90,10 @@
90 <groupId>org.thingsboard</groupId> 90 <groupId>org.thingsboard</groupId>
91 <artifactId>tools</artifactId> 91 <artifactId>tools</artifactId>
92 </dependency> 92 </dependency>
  93 + <dependency>
  94 + <groupId>org.thingsboard</groupId>
  95 + <artifactId>rest-client</artifactId>
  96 + </dependency>
93 </dependencies> 97 </dependencies>
94 98
95 <build> 99 <build>
@@ -106,6 +106,7 @@ @@ -106,6 +106,7 @@
106 <module>tools</module> 106 <module>tools</module>
107 <module>application</module> 107 <module>application</module>
108 <module>msa</module> 108 <module>msa</module>
  109 + <module>rest-client</module>
109 </modules> 110 </modules>
110 111
111 <profiles> 112 <profiles>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0"
  3 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5 + <parent>
  6 + <artifactId>thingsboard</artifactId>
  7 + <groupId>org.thingsboard</groupId>
  8 + <version>2.5.0-SNAPSHOT</version>
  9 + </parent>
  10 + <modelVersion>4.0.0</modelVersion>
  11 +
  12 + <artifactId>rest-client</artifactId>
  13 + <packaging>jar</packaging>
  14 +
  15 + <name>Thingsboard Rest Client</name>
  16 + <url>https://thingsboard.io</url>
  17 +
  18 + <properties>
  19 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  20 + <main.dir>${basedir}/..</main.dir>
  21 + </properties>
  22 +
  23 + <dependencies>
  24 + <dependency>
  25 + <groupId>org.thingsboard.common</groupId>
  26 + <artifactId>data</artifactId>
  27 + </dependency>
  28 + <dependency>
  29 + <groupId>org.springframework.boot</groupId>
  30 + <artifactId>spring-boot-starter-web</artifactId>
  31 + </dependency>
  32 + </dependencies>
  33 +
  34 +</project>
rest-client/src/main/java/org/thingsboard/client/RestClient.java renamed from tools/src/main/java/org/thingsboard/client/tools/RestClient.java
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.thingsboard.client.tools; 16 +package org.thingsboard.client;
17 17
18 import com.fasterxml.jackson.databind.JsonNode; 18 import com.fasterxml.jackson.databind.JsonNode;
19 import com.fasterxml.jackson.databind.ObjectMapper; 19 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -31,7 +31,7 @@ import org.springframework.http.client.support.HttpRequestWrapper; @@ -31,7 +31,7 @@ import org.springframework.http.client.support.HttpRequestWrapper;
31 import org.springframework.util.StringUtils; 31 import org.springframework.util.StringUtils;
32 import org.springframework.web.client.HttpClientErrorException; 32 import org.springframework.web.client.HttpClientErrorException;
33 import org.springframework.web.client.RestTemplate; 33 import org.springframework.web.client.RestTemplate;
34 -import org.thingsboard.client.tools.utils.RestJsonConverter; 34 +import org.thingsboard.client.utils.RestJsonConverter;
35 import org.thingsboard.server.common.data.AdminSettings; 35 import org.thingsboard.server.common.data.AdminSettings;
36 import org.thingsboard.server.common.data.ClaimRequest; 36 import org.thingsboard.server.common.data.ClaimRequest;
37 import org.thingsboard.server.common.data.Customer; 37 import org.thingsboard.server.common.data.Customer;
rest-client/src/main/java/org/thingsboard/client/utils/RestJsonConverter.java renamed from tools/src/main/java/org/thingsboard/client/tools/utils/RestJsonConverter.java
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.thingsboard.client.tools.utils; 16 +package org.thingsboard.client.utils;
17 17
18 import com.fasterxml.jackson.databind.JsonNode; 18 import com.fasterxml.jackson.databind.JsonNode;
19 import org.springframework.util.CollectionUtils; 19 import org.springframework.util.CollectionUtils;