Created
October 25, 2010 05:11
-
-
Save leomao10/644441 to your computer and use it in GitHub Desktop.
typeAlias in Spring.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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
Code From here: http://stackoverflow.com/questions/622938/how-do-i-specify-typealiases-and-objects-in-an-external-spring-net-configuration