Skip to content

Instantly share code, notes, and snippets.

@zzzfree
Last active December 14, 2015 08:49
Show Gist options
  • Save zzzfree/5060808 to your computer and use it in GitHub Desktop.
Save zzzfree/5060808 to your computer and use it in GitHub Desktop.
appliation bean
import org.springframework.context.ApplicationContext
import org.springframework.context.support.FileSystemXmlApplicationContext
class BeanUtil {
ApplicationContext context=new FileSystemXmlApplicationContext("classpath:applicationContext.xml");
static instance = new BeanUtil();
public Object get(Object s) {
return context.getBean(s);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment