Skip to content

Commit

Permalink
constraint common dependencies version (#800)
Browse files Browse the repository at this point in the history
  constraint common dependencies version

  constraint common dependencies version
  • Loading branch information
tomsun28 authored Mar 27, 2023
1 parent 675b757 commit 17588d6
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 144 deletions.
19 changes: 1 addition & 18 deletions alerter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@

<properties>
<common.version>1.0</common.version>
<influxdb-client-java.version>3.4.0</influxdb-client-java.version>
<kafka-clients.version>3.4.0</kafka-clients.version>
<spring-cloud-starter-openfeign.version>3.0.5</spring-cloud-starter-openfeign.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -74,17 +71,10 @@
<artifactId>spring-boot-starter-validation</artifactId>
<scope>provided</scope>
</dependency>
<!-- influxdb -->
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-java</artifactId>
<version>${influxdb-client-java.version}</version>
</dependency>
<!-- kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka-clients.version}</version>
</dependency>
<!--redis-->
<dependency>
Expand All @@ -98,13 +88,6 @@
<artifactId>springdoc-openapi-ui</artifactId>
<scope>provided</scope>
</dependency>
<!-- feign -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>${spring-cloud-starter-openfeign.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
</project>
12 changes: 1 addition & 11 deletions collector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,16 @@
<groupId>com.usthe.tancloud</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
<!-- <scope>provided</scope>-->
</dependency>
<!-- validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- etcd -->
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<version>0.5.11</version>
</dependency>
<!-- kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>3.4.0</version>
</dependency>
<!-- http -->
<dependency>
Expand Down Expand Up @@ -93,12 +85,10 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
</dependency>
<!--collect-->
<!-- mysql -->
Expand Down Expand Up @@ -162,7 +152,7 @@
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>4.8.1</version>
<version>4.6.1</version>
</dependency>
<!--snmp-->
<dependency>
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@
<artifactId>springdoc-openapi-ui</artifactId>
<scope>provided</scope>
</dependency>
<!-- etcd -->
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<version>${jetcd-core.version}</version>
<scope>provided</scope>
</dependency>
<!-- 表达式计算 -->
<dependency>
<groupId>com.googlecode.aviator</groupId>
Expand All @@ -94,17 +87,14 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf-java-util.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
Expand Down
9 changes: 0 additions & 9 deletions common/src/main/java/com/usthe/common/util/GsonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import io.etcd.jetcd.ByteSequence;

import javax.annotation.concurrent.ThreadSafe;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;

/**
* gson 工具类
Expand Down Expand Up @@ -58,13 +56,6 @@ public static <T> T fromJson(JsonElement element, Class<T> clazz) {
return gson.fromJson(element, clazz);
}

public static <T> T fromJson(ByteSequence byteSequence, Class<T> clazz) {
if (byteSequence == null || byteSequence.isEmpty()) {
return null;
}
return gson.fromJson(byteSequence.toString(StandardCharsets.UTF_8), clazz);
}

public static JsonElement toJsonTree(Object source) {
return gson.toJsonTree(source);
}
Expand Down
Binary file added home/static/img/hertzbeat-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified home/static/img/tancloud-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
<mysql.version>8.0.28</mysql.version>
<nekohtml.version>1.9.22</nekohtml.version>
<snake.yaml.version>1.32</snake.yaml.version>
<spring-boot-starter-sureness.version>1.0.8</spring-boot-starter-sureness.version>
<warehouse.version>1.0</warehouse.version>
</properties>
Expand Down Expand Up @@ -104,7 +103,6 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<!--<scope>runtime</scope>-->
</dependency>
<!-- email -->
<dependency>
Expand All @@ -120,7 +118,6 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snake.yaml.version}</version>
</dependency>
<!-- validation -->
<dependency>
Expand All @@ -140,7 +137,6 @@
<version>${h2.version}</version>
<scope>runtime</scope>
</dependency>

<!-- caffeine-->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
package com.usthe.manager.controller;

import com.usthe.common.entity.manager.Monitor;
import com.usthe.common.util.CommonConstants;
import com.usthe.common.util.GsonUtil;
import com.usthe.manager.service.TagService;
import com.usthe.manager.service.impl.MonitorServiceImpl;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.function.Function;

import static org.junit.jupiter.api.Assertions.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

Expand Down Expand Up @@ -110,4 +100,4 @@ void enableManageMonitors() throws Exception {
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andReturn();
}
}
}
32 changes: 32 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<springdoc.version>1.6.11</springdoc.version>
<spring-boot-dependencies.version>2.7.4</spring-boot-dependencies.version>
<xml.bind.version>2.3.0</xml.bind.version>
<snake.yaml.version>1.32</snake.yaml.version>
<kafka-clients.version>3.4.0</kafka-clients.version>
<gson.version>2.8.9</gson.version>
<guava.version>31.0.1-jre</guava.version>
<protobuf-java-util.version>3.19.1</protobuf-java-util.version>
</properties>

<dependencyManagement>
Expand All @@ -52,6 +57,33 @@
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snake.yaml.version}</version>
</dependency>
<!-- kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka-clients.version}</version>
</dependency>
<!-- tool -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf-java-util.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
11 changes: 1 addition & 10 deletions warehouse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<properties>
<common.version>1.0</common.version>
<iotdb-session.version>0.13.3</iotdb-session.version>
<kafka-clients.version>3.4.0</kafka-clients.version>
<spring-cloud-starter-openfeign.version>3.0.5</spring-cloud-starter-openfeign.version>
<taos-jdbcdriver.version>3.0.0</taos-jdbcdriver.version>
</properties>
Expand Down Expand Up @@ -67,7 +66,7 @@
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.taosdata.jdbc/taos-jdbcdriver -->
<!-- taos-jdbc driver -->
<dependency>
<groupId>com.taosdata.jdbc</groupId>
<artifactId>taos-jdbcdriver</artifactId>
Expand All @@ -83,7 +82,6 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka-clients.version}</version>
</dependency>
<!--redis-->
<dependency>
Expand All @@ -97,12 +95,5 @@
<artifactId>springdoc-openapi-ui</artifactId>
<scope>provided</scope>
</dependency>
<!-- feign -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>${spring-cloud-starter-openfeign.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 17588d6

Please sign in to comment.