Skip to content

Instantly share code, notes, and snippets.

@leomao10
Created October 25, 2010 05:11
Show Gist options
  • Save leomao10/644441 to your computer and use it in GitHub Desktop.
Save leomao10/644441 to your computer and use it in GitHub Desktop.
typeAlias in Spring.xml
<!-- in spring config xml file-->
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<object id="program" type="Prog" />
<object id="myTypeAlias" type="Spring.Objects.Factory.Config.TypeAliasConfigurer, Spring.Core">
<property name="TypeAliases">
<dictionary>
<entry key="Prog" value="MyNs.Program, MyLibrary"/>
</dictionary>
</property>
</object>
</objects>
<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
<section name="typeAliases" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core"/>
</sectionGroup>
</configSections>
<spring>
<typeAliases>
<alias name="Prog" type="MyNs.Program, MyLibrary" />
</typeAliases>
<context>
<resource uri="context.xml"/>
</context>
</spring>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment