Skip to content

Commit 28bcfa2

Browse files
authored
Merge pull request #27 from qunarcorp/dev
Dev
2 parents 09090b2 + d649f54 commit 28bcfa2

File tree

53 files changed

+421
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+421
-114
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Bistoury提供可视化页面实时查看机器和应用的各种信息,包括
4545

4646
## java版本要求
4747

48-
jdk1.8+
48+
ui、proxy使用Java1.8,agent使用java1.7或java1.8,由于agent会attach到应用中,所以应用也需要使用Java1.7或Java1.8。Java9及后续版本由于改动较大,会在以后陆续支持。
4949

5050
## 系统要求
5151

@@ -57,10 +57,6 @@ jdk1.8+
5757

5858
## Q & A
5959

60-
- jdk版本要求为1.8,但是代码实现很多是1.7
61-
62-
公司内部使用1.7的jdk,开源版本并没有完全改过来,1.7的代码后续会逐渐修改为1.8的实现。
63-
6460
- 前端有的地方似乎有点不那么好看,实现的似乎也不太棒
6561

6662
所有的前端代码都是后端同学兼职完成,欢迎各位前端大牛贡献相关代码。

bistoury-agent-common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>bistoury</artifactId>
77
<groupId>qunar.tc.bistoury</groupId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

bistoury-agent-common/src/main/java/qunar/tc/bistoury/agent/common/pid/PidUtils.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import qunar.tc.bistoury.agent.common.pid.impl.PidByPsHandler;
2727
import qunar.tc.bistoury.agent.common.pid.impl.PidBySystemPropertyHandler;
2828

29+
import java.util.Collections;
2930
import java.util.Comparator;
3031
import java.util.List;
3132
import java.util.ServiceLoader;
@@ -54,8 +55,16 @@ private static List<PidHandler> initPidHandler() {
5455
handlers.add(new PidByPsHandler());
5556
}
5657

57-
ServiceLoader.load(PidHandlerFactory.class).forEach(factory -> handlers.add(factory.create()));
58-
handlers.sort(Comparator.comparingInt(PidHandler::priority));
58+
ServiceLoader<PidHandlerFactory> handlerFactories = ServiceLoader.load(PidHandlerFactory.class);
59+
for (PidHandlerFactory factory : handlerFactories) {
60+
handlers.add(factory.create());
61+
}
62+
Collections.sort(handlers, new Comparator<PidHandler>() {
63+
@Override
64+
public int compare(PidHandler o1, PidHandler o2) {
65+
return o1.priority() - o2.priority();
66+
}
67+
});
5968
return ImmutableList.copyOf(handlers);
6069
}
6170

bistoury-agent-task/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>bistoury</artifactId>
77
<groupId>qunar.tc.bistoury</groupId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

bistoury-agent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>bistoury</artifactId>
77
<groupId>qunar.tc.bistoury</groupId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

bistoury-application/bistoury-application-api/pom.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,22 @@
55
<parent>
66
<artifactId>bistoury-application</artifactId>
77
<groupId>qunar.tc.bistoury</groupId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>bistoury-application-api</artifactId>
1313

14-
14+
<build>
15+
<finalName>${project.artifactId}</finalName>
16+
<plugins>
17+
<plugin>
18+
<artifactId>maven-compiler-plugin</artifactId>
19+
<configuration>
20+
<source>1.8</source>
21+
<target>1.8</target>
22+
</configuration>
23+
</plugin>
24+
</plugins>
25+
</build>
1526
</project>
Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,57 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<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>bistoury-application</artifactId>
7-
<groupId>qunar.tc.bistoury</groupId>
8-
<version>2.0.2</version>
9-
</parent>
10-
<modelVersion>4.0.0</modelVersion>
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>bistoury-application</artifactId>
7+
<groupId>qunar.tc.bistoury</groupId>
8+
<version>2.0.3</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
1111

12-
<artifactId>bistoury-application-mysql</artifactId>
12+
<artifactId>bistoury-application-mysql</artifactId>
1313

14-
<dependencies>
15-
<dependency>
16-
<groupId>qunar.tc.bistoury</groupId>
17-
<artifactId>bistoury-application-api</artifactId>
18-
</dependency>
19-
<dependency>
20-
<groupId>qunar.tc.bistoury</groupId>
21-
<artifactId>bistoury-common</artifactId>
22-
</dependency>
23-
24-
<dependency>
25-
<groupId>org.springframework</groupId>
26-
<artifactId>spring-context</artifactId>
27-
</dependency>
28-
<dependency>
29-
<groupId>org.springframework</groupId>
30-
<artifactId>spring-jdbc</artifactId>
31-
</dependency>
32-
<dependency>
33-
<groupId>org.apache.tomcat</groupId>
34-
<artifactId>tomcat-jdbc</artifactId>
35-
</dependency>
36-
<dependency>
37-
<groupId>com.google.guava</groupId>
38-
<artifactId>guava</artifactId>
39-
</dependency>
40-
<dependency>
41-
<groupId>mysql</groupId>
42-
<artifactId>mysql-connector-java</artifactId>
43-
</dependency>
44-
</dependencies>
14+
<dependencies>
15+
<dependency>
16+
<groupId>qunar.tc.bistoury</groupId>
17+
<artifactId>bistoury-application-api</artifactId>
18+
</dependency>
19+
<dependency>
20+
<groupId>qunar.tc.bistoury</groupId>
21+
<artifactId>bistoury-common</artifactId>
22+
</dependency>
4523

24+
<dependency>
25+
<groupId>org.springframework</groupId>
26+
<artifactId>spring-context</artifactId>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.springframework</groupId>
30+
<artifactId>spring-jdbc</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.apache.tomcat</groupId>
34+
<artifactId>tomcat-jdbc</artifactId>
35+
</dependency>
36+
<dependency>
37+
<groupId>com.google.guava</groupId>
38+
<artifactId>guava</artifactId>
39+
</dependency>
40+
<dependency>
41+
<groupId>mysql</groupId>
42+
<artifactId>mysql-connector-java</artifactId>
43+
</dependency>
44+
</dependencies>
45+
<build>
46+
<finalName>${project.artifactId}</finalName>
47+
<plugins>
48+
<plugin>
49+
<artifactId>maven-compiler-plugin</artifactId>
50+
<configuration>
51+
<source>1.8</source>
52+
<target>1.8</target>
53+
</configuration>
54+
</plugin>
55+
</plugins>
56+
</build>
4657
</project>

bistoury-application/bistoury-application-mysql/src/main/java/qunar/tc/bistoury/application/mysql/dao/impl/ApplicationUserDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
public class ApplicationUserDaoImpl implements ApplicationUserDao {
3939
private static final String SELECT_APP_BY_USER_CODE = "select app_code from bistoury_user_app where user_code=?";
4040

41-
private static final String ADD_USER_FOR_APP = "insert ignore bistoury_user_app (app_code, user_code) values (?, ?)";
41+
private static final String ADD_USER_FOR_APP = "insert ignore into bistoury_user_app (app_code, user_code) values (?, ?)";
4242

4343
private static final String REMOVE_USER_FROM_APP = "delete from bistoury_user_app where user_code = ? and app_code = ?";
4444

bistoury-application/pom.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>bistoury</artifactId>
77
<groupId>qunar.tc.bistoury</groupId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

@@ -20,5 +20,16 @@
2020
<module>bistoury-application-api</module>
2121
<module>bistoury-application-mysql</module>
2222
</modules>
23-
23+
<build>
24+
<finalName>${project.artifactId}</finalName>
25+
<plugins>
26+
<plugin>
27+
<artifactId>maven-compiler-plugin</artifactId>
28+
<configuration>
29+
<source>1.8</source>
30+
<target>1.8</target>
31+
</configuration>
32+
</plugin>
33+
</plugins>
34+
</build>
2435
</project>

bistoury-attach-arthas/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>bistoury</artifactId>
77
<groupId>qunar.tc.bistoury</groupId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

0 commit comments

Comments
 (0)