commit
parent
429a07e2e3
commit
711b6dabee
|
@ -0,0 +1,18 @@
|
|||
#起始镜像
|
||||
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
|
||||
#暴露端口号
|
||||
EXPOSE 8068
|
||||
#挂载目录的位置
|
||||
VOLUME /home/logs/parseSystem
|
||||
#构建复制外部文件到docker
|
||||
COPY /target/parsesystem.jar /home/app.jar
|
||||
#工作目录 exec -it 进入容器内部后的默认的起始目录
|
||||
WORKDIR /home
|
||||
ENV TIME_ZONE Asia/Shanghai
|
||||
#指定东八区
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
#启动java 程序
|
||||
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-jar","/home/app.jar"]
|
||||
|
||||
|
26
pom.xml
26
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.parseSystem</groupId>
|
||||
<artifactId>parseSystem</artifactId>
|
||||
<artifactId>parsesystem</artifactId>
|
||||
<version>3.6.3</version>
|
||||
|
||||
<properties>
|
||||
|
@ -97,4 +97,28 @@
|
|||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>16</source><target>16</target></configuration></plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -22,6 +22,7 @@ public class FaultEvent extends EventHandlerService implements VehicleEventServ
|
|||
*/
|
||||
@Override
|
||||
public void executeEvent(VehicleData vehicleData) {
|
||||
|
||||
System.out.println("你好故障");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,4 +26,4 @@ spring:
|
|||
publisher-confirms: true #确认消息已发送到交换机(Exchange)
|
||||
publisher-returns: true #确认消息已发送到队列(Queue)
|
||||
server:
|
||||
port: 8066
|
||||
port: 8068
|
||||
|
|
Loading…
Reference in New Issue