Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7572914 建立时间:2006年5月29日 |

| |
[Spring]spring和quartz进行定时邮件发送 软件技术, 电脑与网络
lhwork 发表于 2006/7/7 10:14:01 |
一 发送邮件的基类:
package com.spring.mail;
import org.springframework.mail.MailSender; //import org.springframework.mail.javamail.JavaMailSender;
public abstract class BaseMailSender { protected String to;
protected String |
|
[Spring]Springframwork中集成Velocity的中文解决方案 软件技术, 电脑与网络
lhwork 发表于 2006/7/6 13:28:44 |
在Springframework中使用Velocity是非常方便的,只需在spring配置文件中申明: <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> </bean>即可在spring mvc框架中直接返回new ModelAndView("velocity模板", map),但是中文一直为乱码。为了解决中文问题,首先,考虑到国际化,将所有web页面都用UTF-8编码,然后在/WEB-INF/velocity.properties文件中覆盖velocity的默认编码ISO-8859-1:
阅读全文(3578) | 回复(0) | 编辑 | 精华 | 删除 |
| | |
[Spring]扩展XDoclet对Spring List引用注入的支持 软件技术, 电脑与网络
lhwork 发表于 2006/7/6 13:25:16 |
XDoclet是生成配置文件的强有力的工具,在使用Spring框架时,手动编写Spring配置文件极其繁琐,而且容易遗漏,利用XDoclet即可轻松生成配置文件。
XDoclet支持的Spring方法注入包括:ref,list,name和value。遗憾的是,在某个项目中,我需要注入一个包含Bean引用的List:public void setHandlers(List handlers) { ... }
然后,XDoclet并不支持元素为引用类型的List,倘若使用下列注释:/** * @spring.property list="articleHandler,imageHandler" */ public void setHandlers(List handlers) {   |
|
[Spring]使用Spring进行JMS消息传递 软件技术, 电脑与网络
lhwork 发表于 2006/7/5 14:04:05 |
我碰巧看到了一篇文章,是有关使用Spring框架来简化与IBM WebSphere MQ的交互的。这篇文章是对Spring中的JMS支持的相当不错的介绍,但是有一些重要的东西它却没有提到。
Spring作为J2EE框架的地位,与最近BEA宣布在WebLogic中对Spring提供正式支持这则消息结合起来,就会使一些开发人员认为,
文章中的代码可以不加修改地用于在WebLogic上运行的J2EE应用程序(很有可能,大部分人会选择使用WebLogic
startup类而不是基于文件的JDNI来映射MQ ConnectionFactory和队列到WebLogic
JNDI命名空间中,或通过支持Foreign JMS提供者来映射)。
|
|
[Spring]Spring AOP中文教程 软件技术, 电脑与网络
lhwork 发表于 2006/7/5 13:48:11 |
AOP正在成为软件开发的下一个圣杯。使用AOP,你可以将处理aspect的代码注入主程序,通常主程序的主要目的并不在于处理这些aspect。AOP可以防止代码混乱。
为了理解AOP如何做到这点,考虑一下记日志的工作。日志本身不太可能是你开发的主程序的主要任务。如果能将“不可见的”、通用的日志代码注入主程序中,那该多好啊。AOP可以帮助你做到。
Spring framework是很有前途的AOP技术。作为一种非侵略性的,轻型的AOP
framework,你无需使用预编译器或其他的元标签,便可以在Java程序中使用它。这意味着开发团队里只需一人要对付AOP
framework,其他人还是象往常一样编程。
AOP是很多直觉难以理解的术语的根源。幸运的是,你只要理解三个概念,就可以编写AOP模块。这三个概念是:advice,pointcut和
advisor。advice是你想向别的程序内部不同的地方注入的代码。pointcut定义了需要注入advice的位置,通常是某个特定的类 |
|
[Spring]Spring中的 JasperReports 软件技术, 电脑与网络
lhwork 发表于 2006/6/30 16:15:09 |
13.7. JasperReports JasperReports (http://jasperreports.sourceforge.net)
is a powerful, open-source reporting engine that supports the creation
of report designs using an easily understood XML file formats.
JasperReports is capable of rendering reports output into four
different formats: CSV, Excel, HTML and PDF.
13.7.1. Dependencies (依赖) Your application will need to include
the latest release of |
|
[Spring]使用MethodInvokingJobDetailFactoryBean 软件技术, 电脑与网络
lhwork 发表于 2006/6/30 16:14:03 |
Using the MethodInvokingJobDetailFactoryBean 使用MethodInvokingJobDetailFactoryBean Often
you just need to invoke a method on a specific object. Using the
MethodInvokingJobDetailFactoryBean you can do exactly this: 经常地,你仅仅需要调用一个对象的一个方法。使用MethodInvokingJobDetailFactoryBean,你可以正确地这样做:
<bean id="methodInvokingJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject">< |
|
|