Fixed build issues and classpath issue.

Refer to url:

http://forum.springsource.org/showthread.php?134494-NoUniqueBeanDefinitionException-problem&p=437191#post437191