Strut2+Spring+Hibernate+ibatis
jinshengwork
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
java.lang.NoSuchMethodException 解决办法
etMethod(Class.java:1605)at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.getActionMethod(AnnotationValidationInterceptor.java:55)at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(Annot2010-12-04 09:59:00 · 260 阅读 · 0 评论 -
struts2 select 中使用方法总结
原创 2011-05-31 13:28:13 · 111 阅读 · 0 评论 -
Action中直接返回Ajax请求值的方法
给Ajax;这是我们可以用以下的办法来处理: 1、Action 中的方法返回类型为:void,如:public void getProgressRate() throws UnknownException,IOException 2、struts.xlm配置文件中也不需要配置result,如:<action name="getProgressRate" class="impToolProductAction" method=&q2011-08-11 11:43:14 · 154 阅读 · 0 评论 -
struts2+ajax+json 实例
2012-02-24 17:27:30 · 110 阅读 · 0 评论 -
Spring 事负级别
持当前事务,如果当前没有事务,就以非事务方式执行。MANDATORY:支持当前事务,如果当前没有事务,就抛出异常。REQUIRES_NEW:新建事务,如果当前存在事务,把当前事务挂起。 NOT_SUPPORTED:以非事务方式执行操作,如果当前存在事务,就把当前事务挂起。NEVER:以非事务方式执行,如果当前存在事务,则抛出异常。 程序中对常用的两个属性值是:REQUIRED、SUPPORTS。2012-02-25 14:46:12 · 114 阅读 · 0 评论 -
org.w3c.dom解析xml
959440,959461,959432,959447</newCategoryId> </categoryId> <categoryId> <oldCategoryId>950351</oldCategoryId> <newCategoryId>9546,9599,9599<2012-05-24 16:21:30 · 99 阅读 · 0 评论 -
修改struts2默认的result-type
"org.apache.struts2.dispatcher.ServletDispatcherResult" default="true"/> 我们可以看到struts2默认返回支持的文件类型是:org.apache.struts2.dispatcher.ServletDispatcherResult。二、如果我们的项目显图层使用的文件是FTL,那么我们要如何修改struts2默认的返回类型呢?解决方案如下:1)把struts-defaul2012-11-21 23:21:39 · 106 阅读 · 0 评论 -
org.apache.tomcat.util.http.Parameters processParameters
原创 2012-11-23 16:00:54 · 313 阅读 · 0 评论 -
FTL 使用自定义模板的方法
法。所谓模板是指:可以指定所有的FTL页面自动加载某些代码工具。2)在引入模板前,先要引入模板用到jar。jar的名称分别是:sitemesh-2.2.1.jar 和 struts2-sitemesh-plugin-2.0.11.2.jar。在实际的项目中,可以根据struts2的版本,现在对应jar的版本。3)修改web.xml文件,加入以下内容:<filter> <filter-name>sitemesh</filte2012-11-24 23:54:33 · 348 阅读 · 0 评论 -
基于maven的struts+spring+ibatis(ssi)经典配置
2012-12-06 20:34:55 · 129 阅读 · 0 评论 -
@Resource 注解不生效的解决方案
认支持 @Autowired ,但是呢,这个注解不够强大,我们推荐使用 @Resource。1)在把 @Autowired 换成 @Resource 后,执行程序,程序报nullexceptiop了,发现 @Resource 注入的对象为null,这就是说 @Resource 没有生效;2)在网上查询了一下:使用@Resource ,要进行一个简单的配置:<context:annotation-config/> 在applicationContext.xml2012-12-07 20:20:18 · 1477 阅读 · 0 评论 -
dwr 与spring 完美整合
2012-12-09 20:59:53 · 111 阅读 · 0 评论 -
spring + ibatis 多数据源事务(分布式事务)管理配置方法
2012-12-16 15:32:47 · 182 阅读 · 0 评论 -
Spring 定时器配置实例
cal="cronTrigger_excute_must_value_enter" /> </list> </property> <!-- QuartzScheduler 延时启动,应用启动完后 QuartzScheduler 再启动 --> <property name="startupDelay" value="20"原创 2013-05-03 10:42:15 · 86 阅读 · 0 评论 -
Spring 线程使用实例
name="keepAliveSeconds" value="200" /> <property name="maxPoolSize" value="5" /> <property name="queueCapacity" value="25" /> </bean>2013-05-03 11:20:22 · 97 阅读 · 0 评论 -
struts2 中 <s:radio/> 设置默认值的方法
'MAN''",须这样写。2.遇到value是非字符串的时候<s:radio list='#{ 1:"A", 2:"B", 3:"C" }' name="LoginType" value="3"/> value的值是:"3",直接写就可以了!2011-03-16 10:35:41 · 94 阅读 · 0 评论 -
Tomcat 5.5 日志文件配置方法
/www.apache.org/dist/logging/log4j/1.2.15/apache-log4j-1.2.15.zip2.Tomcat 5.5所需的 commons-logging.jar,下载地址:http://www.apache.org/dist/commons/logging/binaries/commons-logging-1.1.zip3.log4j配置文件:log4j.properties配置内容为:log4j.rootLogger=ERROR,Rlog4j2011-03-15 17:25:50 · 117 阅读 · 0 评论 -
java.lang.ClassCastException: $Proxy11
0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 解决办法如下:在spring的配置文件中加入:<aop:aspectj-autoproxy proxy-target-class="true" /> 重新运行程序,OK!!2011-03-15 14:14:09 · 127 阅读 · 0 评论 -
格式化Hibernate的SQL输出语句
lect </prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.format_sql">true</prop> <prop key="hibernate.use_sql_comments&quo2010-12-04 09:56:00 · 139 阅读 · 0 评论 -
org.apache.commons.dbcp.BasicDataSource 设置技巧
jdbc:mysql://localhost:3306/shopping"/> <property name="username" value="hongboliu"/> <property name="password" value="a123"/> <property name=2010-12-04 09:46:00 · 223 阅读 · 0 评论 -
struts2 中使用jsp:forward 的方法
t; <dispatcher>FORWARD</dispatcher></filter-mapping>第二步:web.xml 中修改或添加<welcome-file-list> <welcome-file>index.jsp</welcome-file></welcome-file-list2010-12-04 09:45:00 · 151 阅读 · 0 评论 -
Struts2+Hibernate+Spring 测试类的书写方法
@Before public void setUp() throws Exception { super.setUp(); this.ctx = new FileSystemXmlApplicationContext(new String[] { "WebRoot/WEB-INF/classes/applicationContext.xml", "src/com2010-12-04 09:40:00 · 86 阅读 · 0 评论 -
Struts2中自定义拦截器导致Action注入参数丢失
<interceptor-ref name="checkLogin"> <param name="excludeMethods"></param> <param name="check">I am here</param&2010-12-04 09:31:00 · 106 阅读 · 0 评论 -
struts2 Interceptor(拦截器)中获取HTTP 参数的方法
2010-12-04 09:29:00 · 301 阅读 · 0 评论 -
使用Spring2.0配置事件管理。
derListenerorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.2010-12-04 09:27:00 · 93 阅读 · 0 评论 -
struts2中格式化输出数字和日期的方法
t.date"><s:param value="publishTime"></s:param></s:text>格式化数字:<s:text name="global.format.money"><s:param value="price"/></s:text&a2010-12-04 09:22:00 · 86 阅读 · 0 评论 -
struts.xml文件的简单配置
ache.org/dtds/struts-2.0.dtd"><struts> <constant name="struts.custom.i18n.resources" value="messages" /> <constant name="struts.i18n.encoding" value="UTF-8"/&原创 2011-02-15 13:50:39 · 91 阅读 · 0 评论 -
在web.xml中配置struts2的代码
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-patt原创 2011-02-15 13:56:55 · 148 阅读 · 0 评论 -
applicationContent.xml样例
a-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springfra原创 2011-02-15 14:10:34 · 82 阅读 · 0 评论 -
hbm.xml样例
nate-mapping-3.0.dtd"><hibernate-mapping> <class name="com.shopping.pojo.Datiel_order" table="datiel_order" catalog="shopping"> <id name="daiel_order_id" type=&qu原创 2011-02-15 14:43:40 · 89 阅读 · 0 评论 -
validation.xml 配置样例
xwork-validator-1.0.2.dtd"><validators> <field name="userName"> <field-validator type="requiredstring"> <param name="trim">true</param&g原创 2011-02-15 15:12:20 · 118 阅读 · 0 评论 -
default.properties 存放的位置
2011-03-03 17:41:20 · 128 阅读 · 0 评论 -
nginx 配置 CORS 支持跨域访问
es/fontawesome/fonts/fontawesome-webfont.woff?v=4.2.0 上的远程资源。可以将资源移动到相同的域名上或者启用 CORS 来解决这个问题。 解决方案是:在nginx的配置中进行配置,配置如下:location ~* \.(eot|ttf|woff)$ { add_header Access-Control-Allow-Origin *;}2014-11-11 20:26:54 · 361 阅读 · 0 评论
分享