stripes 源码阅读
stripes-code-1527-tags-1.5.6\stripes\src\net\sourceforge\stripes\integration\spring\SpringHelper.java
public static void injectBeans(Object bean, ApplicationContext ctx) {
// First inject any values using annotated methods
for (Method m : getMethods(bean.getClass())) {
try {
SpringBean springBean = m.getAnnotation(SpringBean.class);
boolean nameSupplied = !"".equals(springBean.value());
String name = nameSupplied ? springBean.value() : methodToPropertyName(m);
Class<?> beanType = m.getParameterTypes()[0];
Object managedBean = findSpringBean(ctx, name, beanType, !nameSupplied);
m.invoke(bean, managedBean);
}
catch (Exception e) {
throw new StripesRuntimeException("Exception while trying to lookup and inject " +
"a Spring bean into a bean of type " + bean.getClass().getSimpleName() +
" using method " + m.toString(), e);
}
}
// And then inject any properties that are annotated
for (Field f : getFields(bean.getClass())) {
try {
SpringBean springBean = f.getAnnotation(SpringBean.class);
boolean nameSupplied = !"".equals(springBean.value());
String name = nameSupplied ? springBean.value() : f.getName();
Object managedBean = findSpringBean(ctx, name, f.getType(), !nameSupplied);
f.set(bean, managedBean);
}
catch (Exception e) {
throw new StripesRuntimeException("Exception while trying to lookup and inject " +
"a Spring bean into a bean of type " + bean.getClass().getSimpleName() +
" using field access on field " + f.toString(), e);
}
}
}
分享到:
相关推荐
stripes1.5.7+spring3.1.1+MyBatis3.1.1完整框架 本工程代码已完成了Oracle,MySQL,MSSQL2005三种数据库物理分页方言,并测试可用。 本代码集成了xheditor-1.2.1在线编辑器远程抓取图片功能。 集成了excel导入...
这个是本人从官网下载下来的一个简单的网上宠物商店的小小项目,整合了spring、mybatis和stripes
不错的stripes教程,分享一下…… 和我们熟悉 Struts 1 和 Struts 2 类似,Stripes 同样是一种展示...Configuration” 理念,只需要在 Java 代码中加入少量的 Annotation,就可以完成配置,大量减少了 代码的维护工作。
Stripes 完全抛弃了这些框架的弊病,使用了最新的 Java 5 带来的技术,遵循 “Convention over Configuration” 理念,只需要在 Java 代码中加入少量的 Annotation,就可以完成配置,大量减少了代码的维护工作。
Stripes视图框架demo 资源可用性毋庸置疑 下载的童鞋给点辛苦分不要介意
Java Web层框架之比较—比较JSF、Spring MVC、Stripes、Struts 2、Tapestry和Wicket.doc
Stripes是一种新的简易的web框架势,本篇介绍在Stripes中下载excel表格
Make developing web applications in Java easy...Make the Stripes ramp up time for a new developer less than 30 minutes Make it really easy to extend Stripes, without making you configure every last thing
stripes入门,Stripes是一个以让程序员的web开发简单而高效为准则来设计的基于动作的开源Java web框架。本文将介绍Stripes与其它如Struts之类基于动作的框架的区别和其提供的一些存在于Ruby on Rails之中的简单性。
Stripes 快速入门 pdf 中文版 下载
In this 100-page book, you will find that Stripes provides a very simple learning path, where you do not need to understand the entire framework in order to use it. The concept of this book is exactly...
NULL 博文链接:https://rainyear.iteye.com/blog/1539513
Wordpress Blue Stripes模板
Wordpress Neon Stripes模板
NULL 博文链接:https://jayung.iteye.com/blog/1882363
SQL Stripes 2.8.0.900
Stripes是一种新的Web框架,比struts2更简单项式,Stripes使用Ajax
背景-Stripes框架包的简要概述-指导条纹设计的概念-与条带有关的事物的术语条纹显影入门和新环境设置-更详细的概述 World-使用Stripes CLI为FOLIO创建一个hello world应用程序开发和测试指南-如何将现有应用程序迁移...
它仅由一个NPM 指定,该版本指定@folio/stripes-core的版本以及希望作为此平台的一部分提供的任何Stripes模块,以生成客户端捆绑包,以及用于为每个Stripes生成模块描述符的实用程序模块。 请参阅以获取更多信息。...