Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
agent version
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyitao committed Jul 25, 2020
1 parent dbba6f6 commit 3bb4b1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/com/daxiang/core/AgentStartRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public class AgentStartRunner implements ApplicationRunner {
@Autowired
private ServerClient serverClient;

@Value("${version}")
private String version;

@Autowired
private AndroidDeviceChangeListener androidDeviceChangeListener;
@Autowired
Expand All @@ -50,6 +53,8 @@ public class AgentStartRunner implements ApplicationRunner {

@Override
public void run(ApplicationArguments args) throws IOException, InterruptedException {
System.setProperty("agent.version", version);

// 移动端
if (enableAndroid || enableIos) {
String appiumVersion = AppiumServer.getVersion();
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8

#ip取代hostname
spring.boot.admin.client.instance.prefer-ip=true
spring.boot.admin.client.instance.prefer-ip=true

version=@project.version@

0 comments on commit 3bb4b1f

Please sign in to comment.