mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-17 00:36:02 +10:00
[김훈민] [PINPOINT-213] HttpMessageConverter 이용하여 Json응답 생성. common에서 jackson 사용하지 않도록 수정. profiler에서 metric-json 모듈 제거.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-commons/trunk@2730 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package com.nhn.pinpoint.common.bo;
|
||||
|
||||
import org.codehaus.jackson.annotate.JsonIgnore;
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
|
||||
import com.nhn.pinpoint.common.ServiceType;
|
||||
import com.nhn.pinpoint.common.buffer.AutomaticBuffer;
|
||||
import com.nhn.pinpoint.common.buffer.Buffer;
|
||||
@@ -27,12 +24,6 @@ public class AgentInfoBo implements Comparable<AgentInfoBo> {
|
||||
private long endTimeStamp;
|
||||
private int endStatus;
|
||||
|
||||
// it's thread-safe. 공통 bean이 있지만 BO가 spring에 등록 안되어 있으므로 일단 만든다.
|
||||
// @Autowired
|
||||
// @Qualifier("jsonObjectMapper")
|
||||
private ObjectMapper jsonObjectMapper = new ObjectMapper();
|
||||
|
||||
|
||||
public AgentInfoBo(TAgentInfo agentInfo) {
|
||||
this.hostname = agentInfo.getHostname();
|
||||
this.ip = agentInfo.getIp();
|
||||
@@ -192,16 +183,6 @@ public class AgentInfoBo implements Comparable<AgentInfoBo> {
|
||||
return true;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getJson() {
|
||||
try {
|
||||
return jsonObjectMapper.writeValueAsString(this);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "{}";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("AgentInfoBo{");
|
||||
|
||||
Reference in New Issue
Block a user