
SSI/SSH
其实我是一演员
专注,极致,分享,体验。Make a difference.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Spring MVC事务配置 的 2/5种方法
Spring MVC事务配置要了解事务配置的所有方法,请看一下《Spring事务配置的5种方法》本文介绍两种配置方法:1、 XML,使用tx标签配置拦截器实现事务2、 Annotation方式以下所使用环境为Spring4.0.3、Hibernate4.3.5一、 XML,使用tx标签配置拦截器实现事务Entity类User.j...转载 2019-03-25 11:50:34 · 1451 阅读 · 0 评论 -
Spring MVC中@RequestMapping 6个基本用法小结
小结下spring mvc中的@RequestMapping的用法。1)最基本的,方法级别上应用,例如:Java代码@RequestMapping(value="/departments") publicStringsimplePattern(){ System.out.println("simplePatternmethodwa...转载 2019-03-25 11:47:19 · 3159 阅读 · 0 评论 -
Struts2源码中所列 常量Constant配置清单
以下为Struts框架配置文件的所有常量Key的list, 用于配置和检索Struts的配置。来自Struts2.3的源码StrutsConstants.java常量类。如struts.xml的配置如下: <!-- 指定默认编码集 ,作用于HttpServletRequest的setCharacterEncoding()和freemarker,vilocity的输出 --...原创 2019-03-25 11:49:10 · 1042 阅读 · 0 评论 -
Spring MVC-Controller和@RequestMapping ModelAndView配置和用法-restful风格
Spring3系列13-Controller和@RequestMappingController返回值,String或者ModelAndView@RequestMapping关联url@RequestMapping的属性一、 Controller返回值,String或者ModelAndView首先看一下spring的配置文件,如下<?xml...转载 2019-03-25 11:47:12 · 4165 阅读 · 0 评论 -
spring-3.2.9 + struts-2.3.16.3 + mybatis-3.2.8 +mysql SSI集成
1、前置条件:Spring官网下载地址:新版spring官网无直接下载地址,Spring github建议用Maven等类库管理工具。新版的Spring官网把相关下载移到了http://repo.spring.io这个域名下。以下为找到的可直接下载地址:http://maven.springframework.org/release/org/springframework/spring/ ...原创 2019-03-25 11:49:04 · 1470 阅读 · 0 评论 -
改写Restful2ActionMapper让Struts2支持REST风格的URL映射
一篇介绍让Struts2支持REST风格的URL映射的文章:[摘要]: 介绍如何改写Struts2的Restful2ActionMapper来支持REST风格的URL映射。Note:不久前写了一篇文章《使用Restful2ActionMapper让Struts2支持REST风格的URL映射》,但后来发现有些不对,Struts2的Restful2ActionMapper并不按我想的那样运行...转载 2019-03-25 11:47:05 · 1626 阅读 · 0 评论 -
404/500/错误/异常/默认页面配置汇总
404/500/错误/异常/默认页面配置汇总.1、通常的web.xml配置:<!--错误页面:--><error-page> <error-code>404</error-code> <location>/404.html</location> </error-page>...原创 2019-03-25 11:48:52 · 3581 阅读 · 0 评论 -
Struts2配置详解_配置Action
Struts2的核心功能是action,对于开发人员来说,使用Struts2主要就是编写action,action类通常都要实现com.opensymphony.xwork2.Action接口,并实现该接口中的execute()方法。该方法如下:publicString execute()throwsExceptionStruts2并不是要求所有编写的action类都...转载 2019-03-25 11:48:59 · 974 阅读 · 0 评论