价值和参考之间的春季差异



https://www.tutorialspoint.com/spring/constructor_basedor_depparyency_indoction.htm

我的问题是在本教程的最后一句话中。

 A final note, in case you are passing a reference to an object, 
 you need to use ref attribute of <constructor-arg> tag and 
 if you are passing a value directly then you should use value    
 attribute as shown above.

我对对象的引用和值是什么感到有些困惑。

我可以说所有主要类型都是值,所有Java类和Bean都是参考?

这里还可以用作参考?

非常感谢

引用这指向另一个弹簧豆。

值是输入的真实值。例如。" foo"或" 1"

最新更新