有没有一种方法可以在代码更改后将控制器热重载到Beego中?

Is there any way to configure Beego 1.4.2 to hot patch a modified controller following a code change? Out of the box it reloads the entire application following a controller edit, thus causing any session data to be lost. A comment in GG suggests that hot reload existed in Beego 1.3, but I can't find any info as to why 1.4* does not do this. IMHO Beego is a neat framework but I wouldn't use it for a large project without the ability to dynamically update controllers.

It works out of the box for me.

Here are my versions:

bee   :1.4.1
beego :1.6.0
Go    :go version go1.5.3 linux/amd64

Sometimes there is a delay of around 2 seconds. If you look at the console output, you will see something like :

2016/01/22 15:11:21 [INFO] Restarting myapp ...
2016/01/22 15:11:21 [INFO] ./notes is running...
2016/01/22 15:11:21 [asm_amd64.s:1721][I] http server Running on :8080
2016/01/22 15:11:33 [router.go:828][D] | GET 

If you have a syntax error, it wont reload.

To watch and reload more file types, i added 'bee.json' file at the root of the project. The file looks like:

{"watch_ext": ["go","conf","html","css","js","tpl"]}

Other properties you can set can be found here

Josh