Skip to content

Commit b04c7df

Browse files
authored
Merge pull request #31 from SpringCloud/develop
app增加功能合并到master
2 parents 1babca8 + ff22736 commit b04c7df

File tree

8 files changed

+52
-54
lines changed

8 files changed

+52
-54
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ Roadmap 时间点:
7272
| 姓名 | 角色 | github地址|
7373
| -------- | -------- | -------- |
7474
| SoftwareKing | Owner | https://github.com/SoftwareKing|
75-
| iShawnWang | 前端开发 |https://github.com/iShawnWang |
75+
| iShawnWang | 前端开发 | https://github.com/iShawnWang |
76+
| homeant | 前后台开发 | https://github.com/homeant |
7677

7778
### 1.3 Moss的功能
7879

moss-client/moss-client-2.x/src/main/java/org/xujin/moss/client/endpoint/MossMetricsEndpoint.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,18 @@ public HaloMetricResponse HaloMetric() {
5353
haloMetricResponse.setJvmMemoryUsedHeap(String.valueOf(jvmNemoryUsedHeap.getMeasurements().get(0).getValue()));
5454
MetricResponse jvmNemoryUsedNonHeap=metric("jvm.memory.used", Arrays.asList("area:nonheap") );
5555
haloMetricResponse.setJvmMemoryUsedNonHeap(String.valueOf(jvmNemoryUsedNonHeap.getMeasurements().get(0).getValue()));
56-
56+
// 2.0 actuator/metrics 中没有这个key
5757
MetricResponse systemLoadAverage=metric("system.load.average.1m", null );
58-
haloMetricResponse.setSystemloadAverage(String.valueOf(systemLoadAverage.getMeasurements().get(0).getValue()));
59-
58+
if(systemLoadAverage!=null){
59+
haloMetricResponse.setSystemloadAverage(String.valueOf(systemLoadAverage.getMeasurements().get(0).getValue()));
60+
}
6061
MetricResponse heapCommitted=metric("jvm.memory.committed", Arrays.asList("area:heap") );
6162
haloMetricResponse.setHeapCommitted(String.valueOf(heapCommitted.getMeasurements().get(0).getValue()));
6263
MetricResponse nonheapCommitted=metric("jvm.memory.committed", Arrays.asList("area:nonheap") );
6364
haloMetricResponse.setNonheapCommitted(String.valueOf(nonheapCommitted.getMeasurements().get(0).getValue()));
6465

6566
MetricResponse heapMax=metric("jvm.memory.max", Arrays.asList("area:heap") );
6667
haloMetricResponse.setHeapMax(String.valueOf(heapMax.getMeasurements().get(0).getValue()));
67-
68-
6968
getGcinfo(haloMetricResponse);
7069
MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean()
7170
.getHeapMemoryUsage();

moss-extension/src/main/java/org/xujin/moss/controller/AppController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public class AppController {
4242
*/
4343
@PostMapping("/add")
4444
public ResultData addApp(@RequestBody AppModel appModel) {
45-
ResultData result = new ResultData();
4645
appModel.setIsDeleted(Constants.IS_DELETE_FALSE);
4746
appService.addApp(appModel);
48-
return result;
47+
//返回成功状态
48+
return ResultData.builder().data(appModel).build();
4949
}
5050

5151
@GetMapping("/{id}")

moss-web/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<artifactId>springfox-swagger-ui</artifactId>
7676
<version>2.9.2</version>
7777
</dependency>
78-
78+
7979

8080

8181
</dependencies>

moss-web/src/main/resources/application.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ spring:
2020
testOnReturn: false
2121
poolPreparedStatements: true
2222
maxOpenPreparedStatements: 20
23-
2423
boot:
2524
admin:
2625
## 兼容配置Spring Boot 1.X的端点和自定义的端点
@@ -29,7 +28,6 @@ spring:
2928
server:
3029
port: 8080
3130

32-
3331
eureka:
3432
instance:
3533
leaseRenewalIntervalInSeconds: 10

moss-web/src/main/resources/config/readme.md

Whitespace-only changes.

moss-web/src/main/resources/static/umi.css

Lines changed: 42 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

moss-web/src/main/resources/static/umi.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)