Tag: New type logs reverse property position by referencing prot
<BeanID= "Useraction"class= "Com.neusoft.gmsbs.gms.user.action.UserAction"Scope= "Prototype"> < Propertyname= "Userbo"ref= "Userbo" /> </Bean>what does name and ref mean in the properties element within the Spring bean, I know that name represents the ID of the other bean defined, and what does ref mean? This is called Spring's dependency injection, also called control inversion. The bean ID, which is the ID of the bean you're talking about, is the ID of the bean,ref you want to call, not a simple value.
ref location If you want to pass a string, you can replace it with value .
< Propertyname= "Userbo"value= "Zhang San" />
you can use it in your useraction. While ref passes you a bean with your ID Userbo, you can use the attribute in the useraction in the ID Userbo object, which is the equivalent of you putting Userbo this Bean object in your useraction. Ref is your useraction has a property called Userbo, and this userbo is referenced in your config file<BeanID= "Userbo"class="*. Userbo "></Bean>of this class;
Similar to:<property name= "Count" value= "1"/> The value in this notation, except that the name of your property refers to a well-defined class file. Rather than the pure value.
What does the name and ref mean in the properties element in the Spring bean?