2010 年文章归档
共 4 篇文章
org.apache.commons.beanutils.MethodUtils 类反射
Object object = MethodUtils.invokeMethod(Class.forName("类名").newInstance(), "方法名", new Object[] {参数});
2010-11-02 14:56 · j2se · Apache
SSH集成-Struts2
struts.xml <!-- 指定Web应用的默认编码集,相当于调用HttpServletRequest的setCharacterEncoding方法 --> <constant name="struts.i18n.encoding" value="UTF-8" /> <!-- 设置浏览器是否缓存静态内容,默认值为true(生产环境下使用),开发阶段最好关闭 --> <constant name="struts.serve.static.browserCache" value="false" /> <!-- 当struts的配置文件修改后,系统是否自动重新加载该文件,默认值为false(生…
2010-09-30 10:11 · j2ee · Spring · UI · Struts · XML · SSH
SSH2集成-Spring
在web.xml中配置需要加载的大量spring配置文件 <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring-configuration/*.xml </param-value> </context-param> spring-configuration为WEB-INF下的目录文件夹
2010-09-30 09:35 · j2ee · Spring · XML · Web
时间比较结果为HH:MM格式
public static void main(String[] args) { SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String s ="2010-09-28 14:10:00"; String e ="2010-09-28 15:11:00"; try { System.out.println("e = "+fmt.parse(e).getTime()); System.out.println("s = "+fmt.parse(s).getTime()); long ss = (fmt.p…
2010-09-28 14:25 · j2se