app.conf:
appname = gowebProject httpport = 8080 runmode = dev copyrequestbody = true [db] host= localhost port= 3306 databaseName = test userName= root password= root envRar = ${XXX_XXXXX} //XXX_XXXXX 是环境变量
pwd := beego.AppConfig.String("db::password") envVar:=beego.AppConfig.String("db::envRar"))
原文地址:https://www.cnblogs.com/liufei1983/p/10801782.html
时间: 2024-10-03 05:03:15