public static <T> T getComponent(Class<T> beanType) {
assert (s_appContext != null);
Map<String, T> matchedTypes = getComponentsOfType(beanType);
if (matchedTypes.size() > 0) {
for (Map.Entry<String, T> entry : matchedTypes.entrySet()) {
Primary primary = getTargetClass(entry.getValue()).getAnnotation(Primary.class);
if (primary != null)
return entry.getValue();
}
if (matchedTypes.size() > 1) {