beedoc icon indicating copy to clipboard operation
beedoc copied to clipboard

Confusion on accessing config variables

Open kavirajk opened this issue 8 years ago • 2 comments

In the beego docs I see two ways of accessing Config variables but only former works later not working. Am I missing anything?

For example:

  1. According to http://beego.me/docs/mvc/controller/config.md

SessionProvider variable should be accessed like

beego.BConfig.WebConfig.Session.SessionProvider = "file"

  1. But according to http://beego.me/docs/mvc/controller/session.md

SessionProvider variable can be accessed like

beego.SessionProvider = "file"

However 2. is nor working. It Says beego.SessionProvider undefined

Can you guys help me understand what is happening?

Thanks in advance.

kavirajk avatar Feb 05 '16 09:02 kavirajk

Hi @kavirajk , the reason is the document in the second case is wrong, haven't updated for 1.6 yet.

lei-cao avatar Feb 05 '16 10:02 lei-cao

app.conf 里面的key=value,value值怎么修改的。

andarm avatar Mar 16 '17 02:03 andarm