Commit 745d8cce by liuyongshuai

修改完善weblogic的监测方法

parent ea6450ab
package com.cc.bean;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.log4j.Log4j;
/**
* Created by liuys on 2018/11/20.
*/
@Data
@Log4j
@NoArgsConstructor
@AllArgsConstructor
public class JDBCEntity {
private String ServiceName;
private String name;
private String state;
private String versionJDBCDriver;
private Integer maxCapacity;
private Integer activeConnectionsCurrentCount;
//历史最大活跃数
private Integer activeConnectionsHighCount;
//当前连接数
private Integer currCapacity;
//活动连接平均数
private Integer activeConnectionsAverageCount;
//池内空闲连接数
private Integer numAvailable;
//历史最大连接数
private Integer highestNumUnavailable;
//泄漏的连接数
private Integer leakedConnectionCount;
//失败重新连接数
private Integer failuresToReconnectCount;
//返回当前等待连接的总数 WaitingForConnectionCurrentCount
private Integer waitingForConnectionCurrentCount;
}
package com.cc.serviceutil; package com.cc.serviceutil;
import com.cc.bean.Services; import com.cc.bean.Services;
import com.cc.bean.ServicesRest;
import com.cc.service.CrudService; import com.cc.service.CrudService;
import com.cc.service.ServiceService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by changc on 2018/9/11. * Created by changc on 2018/9/11.
...@@ -32,10 +27,13 @@ public class WeblogicReport { ...@@ -32,10 +27,13 @@ public class WeblogicReport {
public void WeblogicReport(){ public void WeblogicReport(){
//System.out.println("心跳开始------------------------------------》"); //System.out.println("心跳开始------------------------------------》");
List<Services> ServiceList= (List<Services>) crudService.SelectServiceList().getData(); List<Services> ServiceList= (List<Services>) crudService.SelectServiceList().getData();
System.out.println(ServiceList); for (Services ser:ServiceList){
int i=1; String name = ser.getApplyName();
System.out.println(i++); System.out.println(name);
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment