Java 值和参考值之间的弹簧差

Java 值和参考值之间的弹簧差,java,spring,Java,Spring,我的问题在本教程的最后一句 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. 最后一个注释,以

我的问题在本教程的最后一句

 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.
最后一个注释,以防传递对对象的引用,
您需要使用标记的ref属性和
如果您直接传递一个值,那么应该使用value
属性,如上图所示。
对于什么是对象的引用,什么是值,我有点困惑

我可以说所有的主要类型都是值,所有的java类和bean都是引用吗

这里还有什么可以作为参考


非常感谢

这篇文章提到了另一个SpringBean


值是输入的真实值。例如,“foo”或“1”指的是另一个springbean


值是输入的真实值。例如,“foo”或“1”

将使用bean实例化java类。因此需要给这个bean一个id,然后使用“ref”字段引用它。java类将使用bean实例化。所以需要给这个bean一个id,然后使用“ref”字段引用它