Topic One: The value of the Bean node in the configuration of the literal question, we present a concept-literal value. Literal: The value represented by the available string. Literals can be
The element tag or the Value property is injected. The basic data types and their encapsulation classes, String types, and so on, can be injected in literal form if the literal value contains special characters, you can use to enclose the literal value. For example: (This article is from: http://my.oschina.net/happyBKs/blog/478074) 12345678910111213141516200000  ] >car definition: 123456789101112131415161718192021222324252627282930package com.happBKs.spring.iocaop.beans; public class Car { string name, double price; public String GetName () { &nbs P return name; } public void SetName (String name) { this.name = name;  } public Double GetPrice () { return price; } public void Setprice (double price) { this.price = Price; } public Car () { super (); } public Car (String name1, double price1) { super (); &N Bsp this.name = name1; &nbSp this.price = Price1;  } @Override public String toString () { return "Car [name] = "+ name +", price= "+ Price +"] "; }} Test code: 12345678910@test public void Test8 () { //Create Sprin G IOC container object. Classpathxmlapplicationcontext represents a configuration file under the Classpath, which is an implementation class for interface ApplicationContext. applicationcontext ctx=new classpathxmlapplicationcontext ("Applicationcontext.xml"); //get the bean instance from the IOC container car cbean= (Car) Ctx.getbean ("car_value_id"); //Call object method  SYSTEM.OUT.PRINTLN (Cbean);  } result output: Car [Name=, price=200000.0] in the previous example, the property value can be configured using the Value child node.
This article from "Just a Dream" blog, declined reprint!
Spring Frame Notes (iv)--spring container property configuration six topics