作者 yangfu

1.修改环境变量

... ... @@ -3,6 +3,7 @@ package main
import (
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log"
"openapi/pkg/constant"
_ "openapi/pkg/infrastructure/bgorm"
_ "openapi/pkg/log"
_ "openapi/pkg/port/beego"
... ... @@ -13,6 +14,6 @@ func main() {
log.Info("server on stop!")
}()
log.Info("server on start!")
//constant.DebugConfig()
constant.DebugConfig()
beego.Run()
}
... ...
... ... @@ -15,7 +15,6 @@ func init() {
log.Error(fmt.Sprintf("【MYSQL】注册数据库失败:%v source:%v", err, constant.MYSQL_DATA_SOURCE))
return
}
log.Debug(fmt.Sprintf("【MYSQL】注册数据库:%v", constant.MYSQL_DATA_SOURCE))
orm.SetMaxIdleConns(aliasName, constant.MYSQL_MAX_IDLE)
orm.SetMaxOpenConns(aliasName, constant.MYSQL_MAX_OPEN)
}
... ...