Commit 743b31041711efdccb7807b7e3fcafe3ac92cfa5
1 parent
f28a66c9
1.异常消费IP记录
Showing
1 changed file
with
3 additions
and
1 deletions
src/main/java/com/bsth/controller/GpsRealDataController.java
| ... | ... | @@ -35,9 +35,11 @@ public class GpsRealDataController { |
| 35 | 35 | static Logger log = LoggerFactory.getLogger(GpsRealDataController.class); |
| 36 | 36 | @RequestMapping("/all") |
| 37 | 37 | public List<GpsEntity> all(HttpServletRequest request){ |
| 38 | - if (access.contains(request.getRemoteHost())) { | |
| 38 | + String remoteHost = request.getRemoteHost(); | |
| 39 | + if (access.contains(remoteHost)) { | |
| 39 | 40 | return GpsBeforeBuffer.pollAll(); |
| 40 | 41 | } else { |
| 42 | + log.error("异常的消费IP:" + remoteHost); | |
| 41 | 43 | return new ArrayList<>(); |
| 42 | 44 | } |
| 43 | 45 | } | ... | ... |