2021-08-20 14:59:13 +08:00
|
|
|
package initialization
|
|
|
|
|
2021-08-20 15:15:05 +08:00
|
|
|
import (
|
2021-08-22 00:13:00 +08:00
|
|
|
"goweb/config"
|
|
|
|
"goweb/global"
|
2021-08-20 15:15:05 +08:00
|
|
|
)
|
2021-08-20 14:59:13 +08:00
|
|
|
|
|
|
|
func Init() {
|
2021-08-20 15:15:05 +08:00
|
|
|
// 初始化日志工具
|
|
|
|
global.InitLogger()
|
|
|
|
// 初始化数据库连接
|
|
|
|
global.InitMySQLClient()
|
2021-08-20 14:59:13 +08:00
|
|
|
// 初始化数据库表
|
|
|
|
DatabaseTable()
|
|
|
|
// 初始化Casbin
|
|
|
|
Casbin()
|
|
|
|
// 初始化Redis
|
|
|
|
InitRedisConn()
|
|
|
|
// 阿里云短信配置
|
|
|
|
config.InitAliSmsConfig()
|
|
|
|
}
|