后台格式规范化 引入casbin做鉴权
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user