{"action":"created","issue":{"url":"https://api.github.com/repos/nutzam/nutz/issues/831","labels_url":"https://api.github.com/repos/nutzam/nutz/issues/831/labels{/name}","comments_url":"https://api.github.com/repos/nutzam/nutz/issues/831/comments","events_url":"https://api.github.com/repos/nutzam/nutz/issues/831/events","html_url":"https://github.com/nutzam/nutz/issues/831","id":67293511,"number":831,"title":"FileSqlManager 在多线程的时候似乎会出现找不到sql的问题","user":{"login":"xbl","id":1027448,"avatar_url":"https://avatars.githubusercontent.com/u/1027448?v=3","gravatar_id":"","url":"https://api.github.com/users/xbl","html_url":"https://github.com/xbl","followers_url":"https://api.github.com/users/xbl/followers","following_url":"https://api.github.com/users/xbl/following{/other_user}","gists_url":"https://api.github.com/users/xbl/gists{/gist_id}","starred_url":"https://api.github.com/users/xbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbl/subscriptions","organizations_url":"https://api.github.com/users/xbl/orgs","repos_url":"https://api.github.com/users/xbl/repos","events_url":"https://api.github.com/users/xbl/events{/privacy}","received_events_url":"https://api.github.com/users/xbl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-09T06:49:28Z","updated_at":"2015-04-09T09:24:56Z","closed_at":null,"body":"  配置文件如下： \r\n   // dao 数据链接\r\n    dao: {\r\n    \ttype : \"org.nutz.dao.impl.NutDao\",\r\n        args : [{refer:\"dataSource\"}, {refer:\"fileSqlManager\"} ]\r\n    },\r\n    // sqls 文件地址\r\n    fileSqlManager: {\r\n    \ttype: \"org.nutz.dao.impl.FileSqlManager\",\r\n    \targs : ['sqls/common.sqls']\r\n    },\r\n    // 数据源\r\n    dataSource: {\r\n        type: \"com.alibaba.druid.pool.DruidDataSource\",\r\n        events: {\r\n            depose: 'close'\r\n        },\r\n        fields: {\r\n        \tdriverClassName: \"org.postgresql.Driver\",\r\n        \ttestWhileIdle: false,\r\n            jdbcUrl : 'jdbc:postgresql://localhost/abc',\r\n            username : 'abc',\r\n            password : 'abc'\r\n        }\r\n    }\r\n\r\n按说sqlManager是单例的，AbstractSqlManager 中的_sql_map 不是线程安全的，需要项目启动的时候手动加载一下，加载之后确还是偶尔会报出SqlNotFoundException: fail to find SQL ‘xxxx’，实在搞不清楚是为什么"},"comment":{"url":"https://api.github.com/repos/nutzam/nutz/issues/comments/91172427","html_url":"https://github.com/nutzam/nutz/issues/831#issuecomment-91172427","issue_url":"https://api.github.com/repos/nutzam/nutz/issues/831","id":91172427,"user":{"login":"xbl","id":1027448,"avatar_url":"https://avatars.githubusercontent.com/u/1027448?v=3","gravatar_id":"","url":"https://api.github.com/users/xbl","html_url":"https://github.com/xbl","followers_url":"https://api.github.com/users/xbl/followers","following_url":"https://api.github.com/users/xbl/following{/other_user}","gists_url":"https://api.github.com/users/xbl/gists{/gist_id}","starred_url":"https://api.github.com/users/xbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbl/subscriptions","organizations_url":"https://api.github.com/users/xbl/orgs","repos_url":"https://api.github.com/users/xbl/repos","events_url":"https://api.github.com/users/xbl/events{/privacy}","received_events_url":"https://api.github.com/users/xbl/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T09:24:56Z","updated_at":"2015-04-09T09:24:56Z","body":"@wendal 咋办？"}}