zhijun0592 / paoding-rose

Automatically exported from code.google.com/p/paoding-rose
0 stars 0 forks source link

期待JADE的第一个5分钟程序 #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
如题

Original issue reported on code.google.com by wensong1...@126.com on 8 Jul 2010 at 3:33

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
http://code.google.com/p/paoding-rose/wiki/Rose_Guide_Application2

http://code.google.com/p/paoding-rose/wiki/Jade_DAO_Spec

Original comment by qieqie.wang on 9 Jul 2010 at 7:59

GoogleCodeExporter commented 8 years ago
赞一下qieqie.wang的速度,辛苦qieqie.wang,期待您的新作,还有�
��个问题,如果直接使用JADE,不放在容器里,怎么使用?
还有一个问题是JADE和Rose化的Controller 
之间似乎不需要配置(唯一配置了一个数据源)什么就可以��
�接注入使用,甚至在JADE与拦截器之间甚至不需要注入,就能
直接使用,我想知道这是怎么做到的?

Original comment by wensong1...@126.com on 9 Jul 2010 at 4:28

GoogleCodeExporter commented 8 years ago
1、目前使用Jade都需要放在容器里,以提供@Autowired
2、以后的版本可能会提供类似 
jadeFactory.getInstance(UserDAO.class)提供,但需要再考虑一下到底有
什么好处,为什么不放到容器?
3、需要再控制器或在拦截器中写@Autowired注入DAO的,这个步骤
不能少;
4、每个控制器所在的包,在rose中都成为一个模块,不同的包
是不同的模块,每个模块都有一个对应自己的WebApplicationContex
t实例,控制器、拦截器就在这些moduleContext中,而jade 
dao是存在于rootContext,他也是一个WebApplicationContext,moduleContex
t中的bean能拿到rootContext的Bean,并进行“注入”,只要能看到
,我们就可以利用Spring机制来完成这个工作。

Original comment by qieqie.wang on 9 Jul 2010 at 4:56

GoogleCodeExporter commented 8 years ago
恩,明白了一些,刚刚研究了一下源码,这一切都似乎跟RoseF
ilter有关系,赞一下,学习中.

Original comment by wensong1...@126.com on 11 Jul 2010 at 3:33