{"action":"created","issue":{"url":"https://api.github.com/repos/beego/bee/issues/449","repository_url":"https://api.github.com/repos/beego/bee","labels_url":"https://api.github.com/repos/beego/bee/issues/449/labels{/name}","comments_url":"https://api.github.com/repos/beego/bee/issues/449/comments","events_url":"https://api.github.com/repos/beego/bee/issues/449/events","html_url":"https://github.com/beego/bee/issues/449","id":236060083,"number":449,"title":"为什么bee api创建的项目，run和代码改变后，总是编译和运行两次","user":{"login":"StoneThroll","id":7332370,"avatar_url":"https://avatars1.githubusercontent.com/u/7332370?v=3","gravatar_id":"","url":"https://api.github.com/users/StoneThroll","html_url":"https://github.com/StoneThroll","followers_url":"https://api.github.com/users/StoneThroll/followers","following_url":"https://api.github.com/users/StoneThroll/following{/other_user}","gists_url":"https://api.github.com/users/StoneThroll/gists{/gist_id}","starred_url":"https://api.github.com/users/StoneThroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StoneThroll/subscriptions","organizations_url":"https://api.github.com/users/StoneThroll/orgs","repos_url":"https://api.github.com/users/StoneThroll/repos","events_url":"https://api.github.com/users/StoneThroll/events{/privacy}","received_events_url":"https://api.github.com/users/StoneThroll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-15T02:28:48Z","updated_at":"2017-06-16T03:35:18Z","closed_at":null,"body":"![image](https://user-images.githubusercontent.com/7332370/27162689-355bf638-51b5-11e7-9a82-64ae2173922e.png)\r\n![image](https://user-images.githubusercontent.com/7332370/27162697-3f704e9e-51b5-11e7-8b6e-5fbe1ecce2dc.png)\r\n\r\n版本信息\r\n![image](https://user-images.githubusercontent.com/7332370/27162716-4dff5c66-51b5-11e7-8c81-2e9ee563726e.png)\r\n"},"comment":{"url":"https://api.github.com/repos/beego/bee/issues/comments/308924318","html_url":"https://github.com/beego/bee/issues/449#issuecomment-308924318","issue_url":"https://api.github.com/repos/beego/bee/issues/449","id":308924318,"user":{"login":"fengjiongmax","id":5288733,"avatar_url":"https://avatars2.githubusercontent.com/u/5288733?v=3","gravatar_id":"","url":"https://api.github.com/users/fengjiongmax","html_url":"https://github.com/fengjiongmax","followers_url":"https://api.github.com/users/fengjiongmax/followers","following_url":"https://api.github.com/users/fengjiongmax/following{/other_user}","gists_url":"https://api.github.com/users/fengjiongmax/gists{/gist_id}","starred_url":"https://api.github.com/users/fengjiongmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengjiongmax/subscriptions","organizations_url":"https://api.github.com/users/fengjiongmax/orgs","repos_url":"https://api.github.com/users/fengjiongmax/repos","events_url":"https://api.github.com/users/fengjiongmax/events{/privacy}","received_events_url":"https://api.github.com/users/fengjiongmax/received_events","type":"User","site_admin":false},"created_at":"2017-06-16T03:35:18Z","updated_at":"2017-06-16T03:35:18Z","body":"可以看到第一次编译的时候会有 generate router from comments，第二次没有\r\n根据 [官方文档](https://beego.me/docs/mvc/controller/router.md#%E6%B3%A8%E8%A7%A3%E8%B7%AF%E7%94%B1)的说法，在检测到文件夹内容有变动之后会生成`routers/commentsRouter.go`这个文件，再进行下面的编译。\r\n在第一次编译完后重新监控文件夹内容，发现了新文件（或者这个文件被重新生成过），就再一次进行编译。\r\n你可以试试看分别修改models和controllers里面的文件，会发现修改models里面的文件不会编译两次，但是修改controllers里面的文件会编译两次。"}}
{"actor":{"display_login":"fengjiongmax"}}