@Component public class GetIpRegionMethod extends BaseMethod
返回结果
string
ip
${getIpRegion('127.0.0.1')}
<script> $.getJSON('${site.dynamicPath}api/method/getIpRegion?parameters=127.0.0.1', function(data){ console.log(data); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private org.lionsoul.ip2region.xdb.Searcher |
searcher |
log
构造器和说明 |
---|
GetIpRegionMethod() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
execute(java.util.List<freemarker.template.TemplateModel> arguments) |
private static IpRegion |
getIpRegion(java.lang.String region) |
int |
minParametersNumber() |
boolean |
needAppToken() |
exec, execute, getBoolean, getDate, getDouble, getInteger, getIntegerArray, getLong, getLongArray, getMap, getModel, getName, getShort, getString, getStringArray, httpEnabled, setName
public GetIpRegionMethod() throws java.io.IOException
java.io.IOException
public java.lang.Object execute(java.util.List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException
execute
在类中 BaseMethod
freemarker.template.TemplateModelException
public int minParametersNumber()
minParametersNumber
在类中 BaseMethod
public boolean needAppToken()
needAppToken
在类中 BaseMethod
private static IpRegion getIpRegion(java.lang.String region)