- 浏览: 8030 次
- 性别:
- 来自: 上海
最近访客 更多访客>>
最新评论
-
syan:
我先收藏了,研究下
单例开发数据库主键生成策略,跨越数据库平台的主键生成方式 -
antonyup_2006:
总结得挺好的,简单明了!
Spring和Struct整合的三个方法
文章列表
struts-config.xml的配置
<action
attribute="helloForm"
input="/form/hello.jsp"
name="helloForm"
path="/hello"
scope="request"
type="com.test.struts.action.HelloAction">
<forward name=&quo ...
- 2007-12-17 13:01
- 浏览 1902
- 评论(0)
方法:
1.使用 Spring 的 ActionSupport 类整合 Structs
2.使用 Spring 的 DelegatingRequestProcessor 覆盖 Struts 的 RequestProcessor
3.将 Struts Action 管理委托给 Spring 框架
无论您使用哪种技术,都需要使用Spring的ContextLoaderPlugin为 Struts 的 ActionServlet 装载 Spring 应用程序环境。就像添加任何其他插件一样,简单地向您的 struts-config.xml 文件添加该插件,如下所示:
<plug-in c ...
- 2007-12-17 11:16
- 浏览 3799
- 评论(1)
工具类:AbstractLanguage
package common.util;
import java.util.Locale;
import java.util.ResourceBundle;
public abstract class AbstractLanguage{
@SuppressWarnings("unused")
private String language;
@SuppressWarnings("unused")
private String region;
private Locale l ...
方向控制:我们使用一个表来存放所有所要管理表的主键和主键值.
表: keytable
create table keytable(
keyname varchar2(20) primary key,
keyvalue number(10) not null);
我们使用一个类来管理类的生成策略: Class KeyInfo
此类一次取出某一个主键的某一个缓冲值范围,每调用一次getNextKey()返回一个此主键的值,并且设定下一个主键值,取值策略如下: 值在范围内,取出值,如果值达到了缓冲范围的最大值,那么和数据库交互一下,生成下一个缓冲范围.在取出缓冲范围之前先更新一下数据库的主键值, ...