Authored by jack

修改 monitor 解析

@@ -8,7 +8,6 @@ import org.slf4j.Logger; @@ -8,7 +8,6 @@ import org.slf4j.Logger;
8 import org.slf4j.LoggerFactory; 8 import org.slf4j.LoggerFactory;
9 import org.springframework.web.bind.annotation.*; 9 import org.springframework.web.bind.annotation.*;
10 10
11 -import java.util.Map;  
12 11
13 12
14 /** 13 /**
@@ -20,11 +19,11 @@ public class SCollectorService extends AbstractService { @@ -20,11 +19,11 @@ public class SCollectorService extends AbstractService {
20 private static final Logger DEBUG = LoggerFactory.getLogger(SCollectorService.class); 19 private static final Logger DEBUG = LoggerFactory.getLogger(SCollectorService.class);
21 20
22 @RequestMapping(value = "/collector", method = RequestMethod.POST) 21 @RequestMapping(value = "/collector", method = RequestMethod.POST)
23 - public void doHandle(@RequestBody String info, @RequestHeader Map<String, String> headerInfo) {  
24 -  
25 - DEBUG.debug("Received collector msg {} form host {}", info, headerInfo.get("Host")); 22 + public void doHandle(@RequestBody String info) {
26 23
  24 +/* DEBUG.debug("Received collector msg {} form host {}", info, headerInfo.get("Host"));*/
27 //2s timeout 25 //2s timeout
  26 +
28 service.submit(new OneJob(new CollectorJob(info), MConstants.HTTPTIMEOUT * 1000)); 27 service.submit(new OneJob(new CollectorJob(info), MConstants.HTTPTIMEOUT * 1000));
29 28
30 } 29 }
@@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
39 <bean id="stringConverter" class="org.springframework.http.converter.StringHttpMessageConverter"> 39 <bean id="stringConverter" class="org.springframework.http.converter.StringHttpMessageConverter">
40 <property name="supportedMediaTypes"> 40 <property name="supportedMediaTypes">
41 <list> 41 <list>
  42 + <value>text/xml</value>
42 <value>text/plain;charset=UTF-8</value> 43 <value>text/plain;charset=UTF-8</value>
43 <value>text/html;charset=UTF-8</value> 44 <value>text/html;charset=UTF-8</value>
44 </list> 45 </list>