|
2 | 2 | #index:0,1 |
3 | 3 | #author:wendal(wendal1985@gmail.com) |
4 | 4 | -------------------------------------------------------------------------------------------------------- |
5 | | -1.r.62 {*待定} 发行注记(暂定20170713) |
| 5 | +1.r.62 {*待定} 发行注记(暂定20170718) |
6 | 6 |
|
7 | 7 | 更新不? |
8 | 8 |
|
9 | 9 | --------------------------------------------------------------------------------------------------------- |
10 | 10 | 主要变化: |
11 | 11 |
|
12 | | - TODO |
| 12 | + * add: [https://github.com/nutzam/nutz/issues/1280 支持把@IocBean标注在方法上,作为工厂方法] by wendal |
| 13 | + * add: [https://github.com/nutzam/nutz/issues/1267 MVC的Param中增加对自定义时间格式的解析] by [https://github.com/elkan1788 elkan1788] |
| 14 | + * add: [https://github.com/nutzam/nutz/issues/1149 Daos.migration要支持Oracle和SqlServer的索引新增 ] by [https://github.com/hzl7652 hzl7652] , [https://github.com/tanqimin tanqimin],wendal |
| 15 | + * add: [https://github.com/nutzam/nutz/pull/1256 dao支持nst] by [https://github.com/l4dfire l4dfire] |
| 16 | + * add: [https://github.com/nutzam/nutz/issues/1268 Images支持图片水平、垂直翻转] by pangwu86 |
| 17 | + * add: [https://github.com/nutzam/nutz/issues/1262 Images工具类加上水印] by pangwu86 |
| 18 | + * fix: [https://github.com/nutzam/nutz/issues/1250 PropertiesProxy.print方法不work] by wendal |
| 19 | + * fix: [https://github.com/nutzam/nutz/issues/1261 json转换08会报错] by [https://github.com/qinerg qinerg] |
| 20 | + * fix: [https://github.com/nutzam/nutz/issues/1261 ChainPasing解析] by [https://github.com/qinerg qinerg] |
| 21 | + * fix: [https://github.com/nutzam/nutz/issues/1271 使用Http工具类获取网页时出错] by [https://github.com/qinerg qinerg] |
| 22 | + * fix: [https://github.com/nutzam/nutz/issues/1276 通过map进行插入操作时,设置主键和自增应该顺序无关] by wendal |
| 23 | + * fix: [https://github.com/nutzam/nutz/issues/1277 MVC @Param 对象属性默认值df无效] by [https://github.com/SkyMonkya SkyMonkya] |
| 24 | + * fix: [https://github.com/nutzam/nutz/issues/1283 HttpTest.test_weibo_post is flaky] by [https://github.com/flakycov flakycov] |
| 25 | + * change: [https://github.com/nutzam/nutz/pull/1249 重写H2下获得表索引方法] by [https://github.com/jiyuefeng jiyuefeng] |
| 26 | + * change: [https://github.com/nutzam/nutz/issues/1282 Dao初始化时引用的FilePool改为懒汉式] by [https://github.com/qinerg qinerg] |
13 | 27 |
|
14 | 28 |
|
15 | 29 | -------------------------------------------------------------------------------------------------------- |
16 | 30 | 部分新功能介绍 |
17 | 31 |
|
18 | | - TODO |
| 32 | + 新增@IocBean实例工厂方法, 可以代替ioc js, 集成第三方类的时候更方便了, 详情查阅文档 [ioc/ioc_factory.man 工厂方法] |
| 33 | + |
| 34 | + {{{ |
| 35 | +@IocBean // 首先,它自己必须加@IocBean, 可以使用@IocBean/@Inject的全部功能. |
| 36 | +public class MyBeanFactory { |
| 37 | + |
| 38 | + @IocBean |
| 39 | + public PropertiesProxy getConf() { |
| 40 | + if ("product".equals(System.getProperty("nutz.runmode"))) { |
| 41 | + return new PropertiesProxy("/etc/nutz/custom"); |
| 42 | + } else { |
| 43 | + return new PropertiesProxy("custom/"); |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + // 生成一个名为dataSource的bean. 命名规则是: IocBean(name=XXX) > 方法名去掉get/build后首字母小写. |
| 48 | + @IocBean |
| 49 | + public SimpleDataSource getDataSource(@Inject("refer:conf")PropertiesProxy conf) { |
| 50 | + SimpleDataSource ds = new SimpleDataSource(); |
| 51 | + ds.setJdbcUrl(conf.get("db.url", "jdbc:h2:mem:nutztest")); |
| 52 | + return ds; |
| 53 | + } |
| 54 | + |
| 55 | + @IocBean |
| 56 | + public Dao buildDao(DataSource dataSource) { // 带参数, 默认是按类型注入 |
| 57 | + return new NutDao(dataSource); |
| 58 | + } |
| 59 | + }}} |
19 | 60 |
|
20 | 61 | -------------------------------------------------------------------------------------------------------- |
21 | 62 | 文档更新 |
22 | 63 |
|
23 | | - TODO |
| 64 | + 基于Wikipedia的要求, nutz的文档已全部应用 [http://zh.wikipedia.org/wiki/Wikipedia:CC-BY-SA-3.0协议文本 知识共享 署名-相同方式共享 3.0协议] 及 |
| 65 | + [http://zh.wikipedia.org/wiki/Wikipedia:GNU自由文档许可证文本 GNU自由文档许可证], 上述协议并不影响大家的使用,请放心. |
| 66 | + |
| 67 | + * add: [http://nutzam.com/core/img/overview.html Images图片水平/垂直翻转/添加水印]的文档 by pangwu86 |
| 68 | + * add: [http://nutzam.com/core/basic/version_upgrade.html 版本升级]的章节 |
| 69 | + * add: [http://nutzam.com/core/ioc/ioc_factory.html Ioc工厂方法]独立为一个章节,并添加@IocBean实例工厂方法的说明 |
| 70 | + * add: [http://nutzam.com/core/weixin/weixin_api.html 微信API] |
| 71 | + * add: [http://nutzam.com/core/weixin/weixin_login.html 微信登录] |
24 | 72 |
|
25 | 73 | -------------------------------------------------------------------------------------------------------- |
26 | 74 | 详细列表: |
|
0 commit comments