由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - spring frame work question
相关主题
Inject property file into a spring bean?问个spring问题
找工作时Spring面试一般问题会怎么问?spring question
请教一个spring的问题guice, spring和ejb
Spring Framework magic谁能给我推荐一个strutsspringhibernate的项目
FrameworkServlet?spring解决了什么问题?
What's going on with Spring IDE's website?Dependency Injection
access java parent class protected variable question请教一个hinbernate mapping的问题,谢谢
问个Spring的问题。一个关于GWT的问题
相关话题的讨论汇总
话题: bean话题: class话题: service话题: use话题: frame
进入Java版参与讨论
1 (共1页)
c**o
发帖数: 186
1
问一个class 怎么去call other service(or class).
我电面问题.
我说need create bean mapping for class and service,
and in the class use beanfactory to get the bean of the service, then use
the service.
he said, that is it?
我错了吗?
我做code的时候,就这样呀.
谁能指点下.
g*****g
发帖数: 34805
2
Usually you inject the other bean into this bean,
that's probably what he expects.

【在 c**o 的大作中提到】
: 问一个class 怎么去call other service(or class).
: 我电面问题.
: 我说need create bean mapping for class and service,
: and in the class use beanfactory to get the bean of the service, then use
: the service.
: he said, that is it?
: 我错了吗?
: 我做code的时候,就这样呀.
: 谁能指点下.

c**o
发帖数: 186
3
faint, I just forgot to mention it.
in bean definition, I can use to inject the bean.
Is that what he want?

【在 g*****g 的大作中提到】
: Usually you inject the other bean into this bean,
: that's probably what he expects.

g*****g
发帖数: 34805
4
That's one way, but more common way is to use setter.

【在 c**o 的大作中提到】
: faint, I just forgot to mention it.
: in bean definition, I can use to inject the bean.
: Is that what he want?

c**o
发帖数: 186
5
Thanks
t*******e
发帖数: 684
6
The guy was testing you the concept of dependency injection.
c**o
发帖数: 186
7
I know.But when explain it to him. he just interrupt me to ask me the real
case. Then, I forget the important thing to mention.
1 (共1页)
进入Java版参与讨论
相关主题
一个关于GWT的问题FrameworkServlet?
spring creating objects depending on properties?What's going on with Spring IDE's website?
问个 spring mvc 的 convention 的问题access java parent class protected variable question
问一个spring dynamic module/OSGi的问题问个Spring的问题。
Inject property file into a spring bean?问个spring问题
找工作时Spring面试一般问题会怎么问?spring question
请教一个spring的问题guice, spring和ejb
Spring Framework magic谁能给我推荐一个strutsspringhibernate的项目
相关话题的讨论汇总
话题: bean话题: class话题: service话题: use话题: frame