JavaScud | Forum | JIRA | Blog |
  Dashboard > SpringSide > Home > SS20Struct
  SpringSide Log In View a printable version of the current page.  
  SS20Struct
Added by calvin, last edited by calvin on Oct 11, 2006  (view change)
Labels: 
(None)

 1.SpringSide项目总体结构

目录 描述
components 构件库目录。其中:
main目录为Spring2.0为基础的基本骨架;
core springside的核心代码目录。
docs 文档目录。目前该目录为空,文档在本wiki内。
examples 示例代码目录。其中:
bookstore是full feature的书店示例;
helloworld是只含Spring+Struts+Hibernate的经典用户管理示例,用于快速入门;
newashion是Spring+Struts2+JPA的新架构,与ROR <aglie web development>一样的depot例子;
misc 杂七杂八的目录,其中:
ide目录放置ide的项目文件模版;
repository目录是发布all-in-one版时作为maven本地仓库带上所有的jar。
servers目录是发布all-in-one版时自带tomcat。
tools
工具目录,其中:
ant: 自带ant 的jar与springside写的可重用ant脚本
springsidetools:springside的代码生成项目生成的ant task, eclipse plugin等
test:测试所需的jar
hibernatetools:hibernate的hibernatetools。

  MainStream Style的项目目结构

  目录结构按Maven2推荐的样式。

目录 描述
src/main/java Java源文件
src/main/java/..../model 领域模型,hbm子目录放hibernate映射文件
src/main/java/..../service 业务逻辑层
src/main/java/..../web Web控制层
src/main/resources 资源文件
src/main/resources/config properties配置文件
src/main/resources/spring Spring的ApplicationContext文件,test子目录放测试时的特殊配置
src/main/resources/i18n i18n国际化文件,cn子目录存放未UTF-8转换前的中文properties文件
src/main/webapp web application目录
src/test 测试文件
src/test/unit 单元测试
src/test/functional 功能测试,集成测试
target 编译、发布的目标目录
target/test 测试的class文件,data文件,报表目录

  配置文件的结构

目录 说明
src/main/resources/ 一些只能放在根目录的properties配置文件,如log4j.properties
src/main/resources/config properties配置文件主目录,如jdbc.properties, hibernate.properties
src/main/resources/spring Spring的ApplicationContext配置文件,注意各模块的service-context文件分开命名,如serviceContext-shop.xml, serviceContext-admin.xml
src/main/webapp/WEB-INF/struts-config.xml Struts的总配置文件
src/main/webapp/WEB-INF/action-servlet.xml Spring与Struts集成的配置文件
src/main/webapp/WEB-INF/modules/struts-config-*.xml 以模块划分的struts配置文件,需要在WEB-INF/web.xml中声明。公共的部分在/WEB-INF/struts-config.xml中定义。
src/main/webapp/WEB-INF/modules/spring-config-*.xml 以模块划分的 spring 对应 struts的配置文件, 需要在WEB-INF/action-servlet.xml 中声明。
src/main/webapp/WEB-INF/modules/validation-*.xml 以模块划分的commons-validation 配置文件,需要在WEB-INF/struts-config.xml 中声明。
Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators