本文整理了Java中org.nutz.ioc.Ioc.getNamesByAnnotation()
方法的一些代码示例,展示了Ioc.getNamesByAnnotation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ioc.getNamesByAnnotation()
方法的具体详情如下:
包路径:org.nutz.ioc.Ioc
类名称:Ioc
方法名:getNamesByAnnotation
暂无
代码示例来源:origin: nutzam/nutzboot
/**
* 容器初始化时,初始化Spring Mvc的Ioc容器,并放入ServletContext
*/
public void contextInitialized(ServletContextEvent sce) {
applicationContext = new XmlWebApplicationContext();
applicationContext.setServletContext(sce.getServletContext());
applicationContext.setConfigLocation(configLocation);
applicationContext.refresh();
appContext.getComboIocLoader().addLoader(new SpringIocLoader2(applicationContext, getSpringBeanNames().toArray(new String[0])));
sce.getServletContext().setAttribute("spring." + selfName, applicationContext);
// 登记所有标注了@AsSpringBean的对象到spring ioc
Ioc ioc = appContext.getIoc();
for (String name : ioc.getNamesByAnnotation(AsSpringBean.class)) {
applicationContext.getBeanFactory().registerSingleton(name, ioc.get(null, name));
}
}
代码示例来源:origin: nutzam/nutzboot
String[] names = appContext.getIoc().getNamesByAnnotation(ActionBean.class);
BuiltInActionLibraryBuilder builder = applicationContext.getBean(BuiltInActionLibraryBuilder.class);
Method method = BuiltInActionLibraryBuilder.class.getDeclaredMethod("buildMethod", Method[].class);
内容来源于网络,如有侵权,请联系作者删除!