Dashboard > SpringSide Wiki > ... > Quickstart > Organization
  SpringSide Wiki Log In | Sign Up   View a printable version of the current page.  
  Organization
Added by SpringSideTeam, last edited by Anonymous on 2008-02-04  (view change)
Labels: 
(None)

 SpringSide 目录结构

 1.SpringSide项目总体结构

目录 描述
bin 执行命令目录
components 构件库目录,其中:
main目录是以Spring2.0为基础的项目基本骨架;
test目录是项目测试所需的jar。
core springside的核心代码目录。
docs 文档目录。文档主要在本wiki内,目录中存放每次版本发布时导出的chm版本参考手册和JavaDoc。
examples 示例代码目录,其中:
bookstore是Full Feature的企业应用书店示例;
helloworld是Spring+Struts+Hibernate的经典用户管理示例,用于快速入门; 
misc 杂七杂八的目录,其中:
ide目录放置ide的项目文件模版;
repository目录是发布all-in-one版时作为maven本地仓库带上所有的jar。
servers目录是发布all-in-one版时带上tomcat 5.5。
tools 工具目录,其中:
ant: 自带ant 的jar与springside写的可重用ant脚本。
springside-ide:项目与代码生成,构件安装的Eclipse plugin。
springside-gen:项目与代码生成,构件安装的的ant脚本。

 2.MainStream Style的项目目结构

  目录结构参考了Maven2推荐的样式,但拒绝了其深闺式的布局。

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

  3. 配置文件的结构

目录 说明
src/resources/ 一些只能放在根目录的properties配置文件,如log4j.properties
src/resources/config properties配置文件主目录,如jdbc.properties, hibernate.properties
src/resources/spring Spring的ApplicationContext配置文件,注意各模块的service-context文件分开命名,如serviceContext-shop.xml, serviceContext-admin.xml
webapp/WEB-INF/struts-config.xml Struts的总配置文件
webapp/WEB-INF/action-servlet.xml Spring与Struts集成的配置文件
webapp/WEB-INF/modules/struts-config-*.xml 以模块划分的struts配置文件,需要在WEB-INF/web.xml中声明。公共的部分在/WEB-INF/struts-config.xml中定义。
webapp/WEB-INF/modules/spring-config-*.xml 以模块划分的 spring 对应 struts的配置文件, 需要在WEB-INF/action-servlet.xml 中声明。
webapp/WEB-INF/modules/validation-*.xml 以模块划分的commons-validation 配置文件,需要在WEB-INF/struts-config.xml 中声明。

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 2006-09-07) - Bug/feature request - Contact Administrators