提交influx造数据的代码
This commit is contained in:
@@ -135,7 +135,6 @@ public class OracleToInfluxDBServiceImpl implements OracleToInfluxDBService {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//采用弱引用接受,后续手动调用gc后,会清空该对象
|
||||
|
||||
12
influx-data/influx-target/Dockerfile
Normal file
12
influx-data/influx-target/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM eclipse-temurin:8-jdk-centos7
|
||||
MAINTAINER hongawen_13914774158@163.com
|
||||
ENV JAVA_OPTS="-Xms2048m -Xmx8192m"
|
||||
# 挂载时区的目录
|
||||
VOLUME /usr/share/zoneinfo
|
||||
# 设置时区为上海
|
||||
ENV TZ=Asia/Shanghai
|
||||
# 设置时区信息
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
ADD target/oracle_influx.jar oracle_influx.jar
|
||||
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /oracle_influx.jar
|
||||
EXPOSE 8090
|
||||
@@ -15,6 +15,15 @@
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<!--docker仓库地址-->
|
||||
<docker.server.url>192.168.1.24</docker.server.url>
|
||||
<!--docker远程守护进程的url-->
|
||||
<docker.url>http://${docker.server.url}:2375</docker.url>
|
||||
<!--docker远程harbor,url-->
|
||||
<docker.repostory>${docker.server.url}:8090</docker.repostory>
|
||||
<!--docker远程项目仓库名-->
|
||||
<docker.registry.name>njcn</docker.registry.name>
|
||||
<docker.operate>install</docker.operate>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -29,6 +38,80 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>oracle_influx</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>${docker.operate}</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<!--<serverId>36dockerHarbor</serverId>-->
|
||||
<registryUrl>http://${docker.repostory}</registryUrl>
|
||||
<!-- 镜像名称 -->
|
||||
<imageName>${docker.repostory}/${docker.registry.name}/${project.artifactId}</imageName>
|
||||
<imageTags>
|
||||
<imageTag>latest</imageTag>
|
||||
</imageTags>
|
||||
<dockerHost>${docker.url}</dockerHost>
|
||||
<dockerDirectory>${basedir}/</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/ROOT</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -7,10 +7,14 @@ server:
|
||||
spring:
|
||||
#influxDB内容配置
|
||||
influx:
|
||||
url: http://192.168.1.81:18086
|
||||
url: http://25.36.232.36:8086
|
||||
user: admin
|
||||
password: 123456
|
||||
database: pqsbase
|
||||
password: admin
|
||||
database: pqsbase_hbcs
|
||||
# url: http://192.168.1.81:18086
|
||||
# user: admin
|
||||
# password: 123456
|
||||
# database: pqsbase
|
||||
mapper-location: com.njcn.influx.imapper
|
||||
application:
|
||||
name: oracle-influx
|
||||
@@ -67,14 +71,20 @@ spring:
|
||||
strict: false
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:oracle:thin:@192.168.1.51:1521:pqsbase
|
||||
username: pqsadmin_hn
|
||||
password: pqsadmin
|
||||
url: jdbc:oracle:thin:@10.122.32.73:11521/dwxb
|
||||
username: pqsadmin
|
||||
password: pqsadmin_123
|
||||
# url: jdbc:oracle:thin:@192.168.1.51:1521:pqsbase
|
||||
# username: pqsadmin_hn
|
||||
# password: pqsadmin
|
||||
driver-class-name: oracle.jdbc.driver.OracleDriver
|
||||
target:
|
||||
url: jdbc:mysql://192.168.1.24:13306/pqsinfo_pq?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=CTT
|
||||
url: jdbc:mysql://25.36.232.37:13306/pmsinfo?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=CTT
|
||||
username: root
|
||||
password: njcnpqs
|
||||
password: Huawei12#
|
||||
# url: jdbc:mysql://192.168.1.24:13306/pqsinfo_pq?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=CTT
|
||||
# username: root
|
||||
# password: njcnpqs
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#mybatis配置信息
|
||||
mybatis-plus:
|
||||
|
||||
Reference in New Issue
Block a user