A sample Spring.net configuration file looks like this
<?xml version="1.0" encoding="utf-8" ?> <object id="Pen" type="Spring4.Pen, Spring4" /> <object id="Pencil" type="Spring4.Pencil, Spring4" /> </objects>
Lets decompose it
It must start with <?xml version=”1.0″ encoding=”utf-8″ ?> because it is a standard xml file.
It must have xmlns=”http://www.springframework.net” namespace and possibly other if you need more features.
<object> refers to a C# class. It is same as bean in JavaWorld.
<propery> means C# property. I can take either value=”” argument, which is a string or a ref=”ID” which is an ID of another object in the XML. It is used for Setter Injection by Spring.NET
<constructor-arg> is used for Constructor Injection. It can also either take a value argument or a ref argument, just like the property. Value is a string and ref is ID of another object.