增加访问ip打印等功能
This commit is contained in:
parent
6eca18b374
commit
992876fa10
@ -1,12 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="b2aca021-ff30-4cbf-8dc9-8cdd4f4c39dc" name="Default Changelist" comment="">
|
<list default="true" id="b2aca021-ff30-4cbf-8dc9-8cdd4f4c39dc" name="Default Changelist" comment="" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/application.go" beforeDir="false" afterPath="$PROJECT_DIR$/application.go" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/example/config/config.json" beforeDir="false" afterPath="$PROJECT_DIR$/example/config/config.json" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/var.go" beforeDir="false" afterPath="$PROJECT_DIR$/var.go" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -80,7 +75,7 @@
|
|||||||
<workItem from="1573372558521" duration="18000" />
|
<workItem from="1573372558521" duration="18000" />
|
||||||
<workItem from="1573372583551" duration="5522000" />
|
<workItem from="1573372583551" duration="5522000" />
|
||||||
<workItem from="1582172338195" duration="5196000" />
|
<workItem from="1582172338195" duration="5196000" />
|
||||||
<workItem from="1582181939594" duration="289000" />
|
<workItem from="1582181939594" duration="501000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="清理">
|
<task id="LOCAL-00001" summary="清理">
|
||||||
<created>1573372845218</created>
|
<created>1573372845218</created>
|
||||||
@ -131,7 +126,14 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1582179656809</updated>
|
<updated>1582179656809</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="8" />
|
<task id="LOCAL-00008" summary="增加访问ip打印等功能">
|
||||||
|
<created>1582182399676</created>
|
||||||
|
<option name="number" value="00008" />
|
||||||
|
<option name="presentableId" value="LOCAL-00008" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1582182399676</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="9" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
@ -155,6 +157,7 @@
|
|||||||
<MESSAGE value="自动设置数据库" />
|
<MESSAGE value="自动设置数据库" />
|
||||||
<MESSAGE value="数据库缓存" />
|
<MESSAGE value="数据库缓存" />
|
||||||
<MESSAGE value="增加跨域配置,以及增加配置说明" />
|
<MESSAGE value="增加跨域配置,以及增加配置说明" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="增加跨域配置,以及增加配置说明" />
|
<MESSAGE value="增加访问ip打印等功能" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="增加访问ip打印等功能" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"cacheLongTime": 2592000,
|
|
||||||
"cacheShortTime": 7200,
|
|
||||||
"crossDomain": "",
|
|
||||||
"dbCached": 0,
|
|
||||||
"dbHost": "127.0.0.1",
|
|
||||||
"dbName": "test",
|
|
||||||
"dbPort": "3306",
|
|
||||||
"dbPwd": "root",
|
|
||||||
"dbUser": "root",
|
|
||||||
"debug": 1,
|
|
||||||
"defFile": [
|
|
||||||
"index.html",
|
|
||||||
"index.htm"
|
|
||||||
],
|
|
||||||
"error": {
|
|
||||||
"1": "内部系统异常",
|
|
||||||
"2": "访问权限异常",
|
|
||||||
"3": "请求参数异常",
|
|
||||||
"4": "数据处理异常",
|
|
||||||
"5": "数据结果异常"
|
|
||||||
},
|
|
||||||
"logLevel": 1,
|
|
||||||
"modeRouterStrict": false,
|
|
||||||
"port": "8080",
|
|
||||||
"sessionName": "HOTIME",
|
|
||||||
"tlsCert": "",
|
|
||||||
"tlsKey": "",
|
|
||||||
"tlsPort": "0",
|
|
||||||
"tpt": "tpt"
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
"cacheLongTime": "两级缓存,长缓存存储时间60 * 60 * 24 * 30,一般为数据库或者redis缓存",
|
|
||||||
"cacheShortTime": "两级缓存,短缓存存储时间60 * 60 * 2,一般为内存缓存",
|
|
||||||
"crossDomain": "跨域设置,空字符串为不开启,*为开启所有网站允许跨域,http://www.baidu.com为指定域允许跨域",
|
|
||||||
"dbCached": "是否开启数据库缓存0为关闭,其他开启",
|
|
||||||
"dbHost": "数据库ip地址默认127.0.0.1",
|
|
||||||
"dbName": "数据库名称,sqlite为文件路径比如a/x.db",
|
|
||||||
"dbPort": "数据库端口",
|
|
||||||
"dbPwd": "数据库密码",
|
|
||||||
"dbType": "如果使用自动数据库配置,请设置此项,手动配置数据库不需要,目前支持mysql,sqlite",
|
|
||||||
"dbUser": "数据库用户名",
|
|
||||||
"debug": "是否开启debug模式,0关闭,其他开启,debug模式下日志展示更全",
|
|
||||||
"defFile": "默认访问文件,默认访问index.html或者index.htm文件",
|
|
||||||
"error": {
|
|
||||||
"1": "内部系统异常,在环境配置,文件访问权限等基础运行环境条件不足造成严重错误时使用",
|
|
||||||
"2": "访问权限异常,没有登录或者登录异常等时候使用",
|
|
||||||
"3": "请求参数异常,request参数不满足要求,比如参数不足,参数类型错误,参数不满足要求等时候使用",
|
|
||||||
"4": "数据处理异常,数据库操作或者三方请求返回的结果非正常结果,比如数据库突然中断等时候使用",
|
|
||||||
"5": "数据结果异常,一般用于无法给出response要求的格式要求下使用,比如response需要的是string格式但你只能提供int数据时",
|
|
||||||
"注释": "web服务内置错误提示,自定义异常建议10开始"
|
|
||||||
},
|
|
||||||
"logLevel": "日志等级,0打印,1关闭,2,记录到文件",
|
|
||||||
"modeRouterStrict": "路由严格模式false,为大小写忽略必须匹配,true必须大小写匹配",
|
|
||||||
"port": "web服务开启Http端口,0为不启用http服务",
|
|
||||||
"redisHost": "需要使用redis服务时配置,默认服务ip:127.0.0.1",
|
|
||||||
"redisPort": "需要使用redis服务时配置,默认服务端口:6379",
|
|
||||||
"redisPwd": "需要使用redis服务时配置,默认服务密码:123456",
|
|
||||||
"sessionName": "设置session的cookie名默认HOTIME",
|
|
||||||
"tlsCert": "https证书",
|
|
||||||
"tlsKey": "https密钥",
|
|
||||||
"tlsPort": "web服务https端口,0为不启用https服务",
|
|
||||||
"tpt": "静态文件目录,默认为程序目录下tpt目录"
|
|
||||||
}
|
|
15
var.go
15
var.go
@ -25,7 +25,6 @@ var Config = Map{
|
|||||||
},
|
},
|
||||||
"tpt": "tpt",
|
"tpt": "tpt",
|
||||||
"defFile": []string{"index.html", "index.htm"},
|
"defFile": []string{"index.html", "index.htm"},
|
||||||
"crossDomain": "", //是否开启跨域
|
|
||||||
"modeRouterStrict": false, //路由严格模式/a/b/c
|
"modeRouterStrict": false, //路由严格模式/a/b/c
|
||||||
"port": "0",
|
"port": "0",
|
||||||
"sessionName": "HOTIME",
|
"sessionName": "HOTIME",
|
||||||
@ -42,11 +41,11 @@ var ConfigNote = Map{
|
|||||||
"dbUser": "数据库用户名",
|
"dbUser": "数据库用户名",
|
||||||
"dbPwd": "数据库密码",
|
"dbPwd": "数据库密码",
|
||||||
"dbPort": "数据库端口",
|
"dbPort": "数据库端口",
|
||||||
"dbType": "如果使用自动数据库配置,请设置此项,手动配置数据库不需要,目前支持mysql,sqlite",
|
"dbType": "如果需要使用自动数据库配置,请设置此项,手动配置数据库不需要,目前支持mysql,sqlite",
|
||||||
"dbCached": "是否开启数据库缓存0为关闭,其他开启", //0不开启缓存
|
"dbCached": "是否开启数据库缓存0为关闭,其他开启", //0不开启缓存
|
||||||
"redisHost": "需要使用redis服务时配置,默认服务ip:127.0.0.1",
|
"redisHost": "如果需要使用redis服务时配置,默认服务ip:127.0.0.1",
|
||||||
"redisPort": "需要使用redis服务时配置,默认服务端口:6379",
|
"redisPort": "如果需要使用redis服务时配置,默认服务端口:6379",
|
||||||
"redisPwd": "需要使用redis服务时配置,默认服务密码:123456",
|
"redisPwd": "如果需要使用redis服务时配置,默认服务密码:123456",
|
||||||
"cacheShortTime": "两级缓存,短缓存存储时间60 * 60 * 2,一般为内存缓存",
|
"cacheShortTime": "两级缓存,短缓存存储时间60 * 60 * 2,一般为内存缓存",
|
||||||
"cacheLongTime": "两级缓存,长缓存存储时间60 * 60 * 24 * 30,一般为数据库或者redis缓存",
|
"cacheLongTime": "两级缓存,长缓存存储时间60 * 60 * 24 * 30,一般为数据库或者redis缓存",
|
||||||
"error": Map{
|
"error": Map{
|
||||||
@ -59,9 +58,9 @@ var ConfigNote = Map{
|
|||||||
},
|
},
|
||||||
"tpt": "静态文件目录,默认为程序目录下tpt目录",
|
"tpt": "静态文件目录,默认为程序目录下tpt目录",
|
||||||
"defFile": "默认访问文件,默认访问index.html或者index.htm文件",
|
"defFile": "默认访问文件,默认访问index.html或者index.htm文件",
|
||||||
"crossDomain": "跨域设置,空字符串为不开启,*为开启所有网站允许跨域,http://www.baidu.com为指定域允许跨域", //是否开启跨域
|
"crossDomain": "如果需要跨域设置,空字符串为不开启,*为开启所有网站允许跨域,http://www.baidu.com为指定域允许跨域", //是否开启跨域
|
||||||
"modeRouterStrict": "路由严格模式false,为大小写忽略必须匹配,true必须大小写匹配", //路由严格模式/a/b/c
|
"modeRouterStrict": "路由严格模式false,为大小写忽略必须匹配,true必须大小写匹配", //路由严格模式/a/b/c
|
||||||
"connectLogShow": "web访问链接、访问ip、访问时间打印,0为关闭其他数字开启此功能",
|
"connectLogShow": "如果需要web访问链接、访问ip、访问时间打印,0为关闭其他数字开启此功能",
|
||||||
"sessionName": "设置session的cookie名默认HOTIME",
|
"sessionName": "设置session的cookie名默认HOTIME",
|
||||||
"port": "web服务开启Http端口,0为不启用http服务",
|
"port": "web服务开启Http端口,0为不启用http服务",
|
||||||
"tlsPort": "web服务https端口,0为不启用https服务",
|
"tlsPort": "web服务https端口,0为不启用https服务",
|
||||||
|
Loading…
Reference in New Issue
Block a user