后台格式规范化 引入casbin做鉴权

This commit is contained in:
pixel
2019-12-12 13:21:16 +08:00
parent effab2d2b0
commit 3f17e80944
46 changed files with 576 additions and 338 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ var Dbconfig Config
func init() {
v := viper.New()
v.SetConfigName("config") // 设置配置文件名 (不带后缀)
v.AddConfigPath("./config/dbconfig/") // 第一个搜索路径
v.AddConfigPath("./static/dbconfig/") // 第一个搜索路径
v.SetConfigType("json")
err := v.ReadInConfig() // 搜索路径,并读取配置数据
if err != nil {
-9
View File
@@ -1,9 +0,0 @@
{
"admin": {
"username": "root",
"password": "Aa@6447985",
"path": "127.0.0.1:3306",
"dbname": "qmplus",
"config": "charset=utf8&parseTime=True&loc=Local"
}
}