Skip to content

Instantly share code, notes, and snippets.

@vangie
Created July 25, 2012 07:16
Show Gist options
  • Save vangie/3174886 to your computer and use it in GitHub Desktop.
Save vangie/3174886 to your computer and use it in GitHub Desktop.
使用Spring初始化一个自己实例化的Bean
private View applyLifecycleMethods(String viewName, AbstractView view) {
return (View) getApplicationContext().getAutowireCapableBeanFactory().initializeBean(view, viewName);
}
//参考 UrlBasedViewResolver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment