All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mizhousoft.commons.context.util.ServiceContextHolder Maven / Gradle / Ivy

package com.mizhousoft.commons.context.util;

import com.mizhousoft.commons.context.support.ApplicationContextRegistration;

/**
 * ContextHolder
 * 
 * @version
 */
public class ServiceContextHolder
{
	/**
	 * 获取服务
	 * 
	 * @param name
	 * @return
	 */
	public static Object getService(String name)
	{
		return ApplicationContextRegistration.getBean(name);
	}

	/**
	 * 获取服务
	 * 
	 * @param 
	 * 
	 * @param clazz
	 * @return
	 */
	public static  T getService(Class clazz)
	{
		return ApplicationContextRegistration.getBean(clazz);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy