摘要: 卸载ADT的方法,方法如下(我的Eclipse版本为3.5):1、选择 Help > Install New Software;2、在"Details" 面板中, 点击"What is already installed?" 链接;3、在Eclipse Installation Details 对话框中,选择"Android DDMS"和"Android Development Tools" ,然后点击Uninstall;4、在下一个窗口中,确认要删除的ADT,然后点击Finish进行删除;5、重启Eclip 阅读全文
posted @ 2012-09-07 11:20 daveztong 阅读(3054) 评论(0) 推荐(0) 编辑
摘要: A、@SessionAttributesorg.springframework.web.bind.annotation.SessionAttributespublic @interface SessionAttributesAnnotation that indicates the session attributes that a specific handler uses. This will typically list the names of model attributes which should be transparently stored in the session or 阅读全文
posted @ 2012-09-03 12:19 daveztong 阅读(2467) 评论(0) 推荐(0) 编辑
摘要: @ExceptionHandlerorg.springframework.web.bind.annotation.ExceptionHandlerpublic @interface ExceptionHandlerAnnotation for handling exceptions in specific handler classes and/or handler methods. Provides consistent style between Servlet and Portlet environments, with the semantics adapting to the con 阅读全文
posted @ 2012-09-03 12:19 daveztong 阅读(1421) 评论(0) 推荐(0) 编辑
摘要: @InitBinderorg.springframework.web.bind.annotation.InitBinderpublic @interface InitBinderAnnotation that identifies methods which initialize the WebDataBinder which will be used for populating command and form object arguments of annotated handler methods.由这个注释标识的方法,它初始化WebDataBinder,这个WebDataBinder 阅读全文
posted @ 2012-09-03 12:18 daveztong 阅读(1738) 评论(0) 推荐(0) 编辑
摘要: A、@ModelAttributeAnnotation that binds a method parameter or method return value to a named model attribute, exposed to a web view. Supported for RequestMapping annotated handler classes.在被@RequestMapping注释的处理器类中,这个注释可以绑定一个方法参数或绑定一个方法的返回值到一个命名的模型属性,提供给一个视图。Can be used to expose command objects to a 阅读全文
posted @ 2012-09-03 11:51 daveztong 阅读(1362) 评论(0) 推荐(1) 编辑
摘要: 下列参数一般都和@RequestMapping配合使用。A、@CookieValueorg.springframework.web.bind.annotation.CookieValuepublic @interface CookieValueAnnotation which indicates that a method parameter should be bound to an HTTP cookie. Supported for annotated handler methods in Servlet and Portlet environments.这个注释表示一个方法参数绑定到一 阅读全文
posted @ 2012-09-03 11:50 daveztong 阅读(1644) 评论(0) 推荐(0) 编辑
摘要: A、@RequestMappingorg.springframework.web.bind.annotation.RequestMappingAnnotation for mapping web requests onto specific handler classes and/or handler methods. Provides consistent style between Servlet and Portlet environments, with the semantics adapting to the concrete environment.@RequestMapping 阅读全文
posted @ 2012-09-03 11:48 daveztong 阅读(18356) 评论(0) 推荐(0) 编辑
摘要: 基于注释的控制器配置需要Java 5以上的版本支持。这种注释支持servlet MVC和Portlet MVC。通过这种方式实现的控制器不需要继承特定的基础类,或实现特定的接口。A、Dispatcher配置文件DispatcherServlet和DispatcherPortlet都默认支持注释配置控制器。以DispatcherServlet为例,它默认支持实现HandlerMapping接口的DefaultAnnotationHandlerMapping和实现HandlerAdapter接口的AnnotationMethodHandlerAdapter来支持注释配置控制器。所有我们无需在Dis 阅读全文
posted @ 2012-09-03 11:45 daveztong 阅读(1353) 评论(0) 推荐(0) 编辑
摘要: URLPath匹配原则路 径匹配原则(Path Matching) Spring MVC中的路径匹配要比标准的web.xml要灵活的多。默认的策略实现了 org.springframework.util.AntPathMatcher,就像名字提示的那样,路径模式是使用了Apache Ant的样式路径,Apache Ant样式的路径有三种通配符匹配方法(在下面的表格中列出)这些可以组合出很多种灵活的路径模式Table Ant Wildcard CharactersWildcardDescription?匹配任何单字符*匹配0或者任意数量的字符**匹配0或者更多的目录Table Example A 阅读全文
posted @ 2012-09-02 13:47 daveztong 阅读(2079) 评论(0) 推荐(1) 编辑
摘要: 先让我们来看一段摘自《Spring 2.5 Reference 中文版》(http://www.redsaga.com/spring_ref/2.5/spring-reference.pdf)的一段关于FileUpload的开场描述: "Spring支持web应用中的分段文件上传。这种支持是由即插即用的MultipartResolver来实现。这些解析器都定义在org.springframework.web.multipart包里。Sprig提供了现成的MultipartResolver可以支持Commons FileUpload(http://jakarta.apache.org/ 阅读全文
posted @ 2012-09-01 15:29 daveztong 阅读(1760) 评论(0) 推荐(0) 编辑
摘要: Since I spent a lot of time on this issue, I thought I'd share my solution. Since spring 3.0.4, there is a configuration parameter that is called<mvc:resources/>(more about that on thereference documentation website) which can be used to serve static resources while still using the Dispatc 阅读全文
posted @ 2012-09-01 12:48 daveztong 阅读(2010) 评论(0) 推荐(0) 编辑
摘要: 联合主键用Hibernate注解映射方式主要有三种:第一、将联合主键的字段单独放在一个类中,该类需要实现java.io.Serializable接口并重写equals和hascode,再将该类注解为@Embeddable,最后在主类中(该类不包含联合主键类中的字段)保存该联合主键类的一个引用,并生成set和get方法,并将该引用注解为@Id第二、将联合主键的字段单独放在一个类中,该类需要实现java.io.Serializable接口并重写equals和hascode,最后在主类中(该类不包含联合主键类中的字段)保存该联合主键类的一个引用,并生成set和get方法,并将该引用注解为@Embed 阅读全文
posted @ 2012-08-17 10:44 daveztong 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 平时写mapping的文件需要一个一个的放到配置文件里,比如1.<propertyname="mappingResources">2.<list>3.<value>model/Classes.hbm.xml</value>4.<value>model/Parent.hbm.xml</value>5.<value>model/Child.hbm.xml</value>6.<value>model/User.hbm.xml</value>7.</list 阅读全文
posted @ 2012-08-17 09:37 daveztong 阅读(579) 评论(0) 推荐(0) 编辑
摘要: Tomcat 内存配置2009年08月11日 17:05tomcat 启动内存设置其初始空间(即-Xms)是物理内存的1/64,最大空间(-Xmx)是物理内存的1/4。可以利用JVM提供的-Xmn -Xms -Xmx等选项可进行设置三、实例,以下给出1G内存环境下java jvm 的参数设置参考:JAVA_OPTS="-server -Xms800m -Xmx800m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m -Djava.awt.headless=true "JAVA_OPTS="-ser 阅读全文
posted @ 2012-08-16 15:59 daveztong 阅读(11925) 评论(0) 推荐(0) 编辑
摘要: With the advent of Spring 2.0, it has become possible to start using the Hibernate Session API directly again. The question is whether or not it is wise to abandon the use of the HibernateTemplate when working with Hibernate, or any other template-based approaches Spring features.USING SPRING XXXTEM 阅读全文
posted @ 2012-08-15 14:03 daveztong 阅读(507) 评论(0) 推荐(0) 编辑
摘要: /** * Copyright (c) 2005-2011 springside.org.cn * * Licensed under the Apache License, Version 2.0 (the "License"); * * $Id$ */package org.springside.modules.orm.hibernate;import java.io.Serializable;import java.util.Collection;import java.util.List;import java.util.Map;import org.hibernat 阅读全文
posted @ 2012-08-15 12:36 daveztong 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 首先遇到的问题就是HibernateDaoSupport引起的,程序中所有的DAO都继承自HibernateDaoSupport,而HibernateDaoSupport需要注入sessionfactory或者hibernateTemplate,所以出现"sessionFactory " or "hibernateTemplate " is required异常,但是在spring配置文件中加入sessionFactory的bean配置以后,仍然出现异常。后来看了网上的解决方式 ,原因是spring.xml中没有加上default-autowire=&q 阅读全文
posted @ 2012-08-14 16:55 daveztong 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 整合spring和DWR时出现了CSRF Security Error。解决办法:修改 web.xml 中 DWR配置信息原:<servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value&g 阅读全文
posted @ 2012-08-10 20:56 daveztong 阅读(586) 评论(0) 推荐(0) 编辑
摘要: 1.drawable-(hdpi,mdpi,ldpi)的区别dpi是“dot per inch”的缩写,每英寸像素数。四种密度分类: ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high)一般情况下的普通屏幕:ldpi是120,mdpi是160,hdpi是240,xhdpi是320。2.WVGA,HVGA,QVGA的区别VGA是"Video Graphics Array",显示标准为640*480。WVGA(Wide VGA)分辨率为480*800HVGA(Half VGA)即VGA的一半分辨率为320* 阅读全文
posted @ 2012-07-02 19:09 daveztong 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 首先简单介绍一下RAM、ROM的基础概念:RAM:手机的运行内存,相当于电脑内存条,决定你手机的运行性能、流畅度,系统犯卡就是因为RAM过小。通常Android2.3建议最小256M,Android4.0建议最小513M。ROM:手机内存 ,手机自带存储空间大小, 也就是系统分区,类似电脑的系统盘。如iPhone的8G、16G内存就是指次。用Android SDK建立完虚拟安卓设备后,系统只会分配给它们很小的内存,我们需要手动调整一下来提高性能。修改的方法有几种,这里只介绍最简单的一种,高手请直接无视用CMD吧。首先是修改RAM大小,方法比较简单,AVD控制界面就可修改。(老版本的SDK无效, 阅读全文
posted @ 2012-06-30 14:46 daveztong 阅读(1674) 评论(0) 推荐(0) 编辑