MCPcopy Create free account
hub / github.com/diyhi/bbs / queryAddress

Method queryAddress

src/main/java/cms/utils/IpAddress.java:117–131  ·  view source on GitHub ↗

查询IP归属地 @param ip IP地址 @return

(String ip)

Source from the content-addressed store, hash-verified

115 * @return
116 */
117 public static String queryAddress(String ip){
118 if(searcher != null){
119 try {
120
121 return format(searcher.search(ip));
122 } catch (Exception e) {
123 // TODO Auto-generated catch block
124 // e.printStackTrace();
125 if (logger.isErrorEnabled()) {
126 logger.error("IP地址查询错误",e);
127 }
128 }
129 }
130 return "";
131 }
132
133 /**
134 * 查询省份IP归属地

Callers 14

getStaffLoginLogListMethod · 0.95
getUserLoginLogListMethod · 0.95
getUserLoginLogMethod · 0.95
getFeedbackDetailMethod · 0.95
getEditReplyViewModelMethod · 0.95
getTopicDetailMethod · 0.95
getPageViewListMethod · 0.95
getQuestionDetailMethod · 0.95
getReportListMethod · 0.95
getTopicReportListMethod · 0.95
getQuestionReportListMethod · 0.95

Calls 2

formatMethod · 0.95
searchMethod · 0.45

Tested by

no test coverage detected