2. BUILD AND DEPLOYMENT
编译和发布
This directory contains the web app source.
For deployment, it needs to be built with Apache Ant.
The only requirements are JDK >=1.3 and Ant >=1.5.
这个目录包含了web程序的源代码。发布需要Apache Ant 构建。唯一的要求是
JDK版本 高于1.3 Ant 版本高于1.5
Run "build.bat" in this directory for available targets (e.g. "build.bat build",
"build.bat warfile"). Note that to start Ant this way, you'll need an XML parser
in your classpath (e.g. in "%JAVA_HOME%/jre/lib/ext"; included in JDK 1.4).
运行build.bat带上有效的目标,例如build.bat build , build.bat warfile 。必须注意的是XML 解析器 必须在classpath 里面,例如%JAVA_HOME%/jre/lib/ext
You can use "warfile.bat" as a shortcut for WAR file creation.
The WAR file will be created in the "dist" directory.
你能使用warfile.bat作为一个快捷方式构建一个war文件。war文件将被创建在dist目录。
To execute the web application with its default settings, simply start the
HSQLDB instance in the "db/hsqldb" directory, for example using "server.bat".
For other databases, you'll need to use the corresponding schema and load scripts
in the "db" subdirectories (same as with the original JPetStore). In the local
case, the JDBC settings can be adapted in "WEB-INF/jdbc.properties". With JTA,
you need to set up corresponding DataSources in your J2EE container.
以这个web应用的默认设置执行,简单的启动在db/hsqldb目录中的HSQLDB实例,例如使用"server.bat".如果要使用其他数据库,你将需要使用相应的schema 和加载脚本在db子目录中。在本地情景中,在WEB-INF/jdbc.properties中设置JDBC配置使用。如果要使用JTA,你需要在J2EE 容器中设置相应的数据源。
Note that the "WEB-INF/dataAccessContext-*.xml" files might have to be adapted
for certain databases like MS-SQL and Oracle, to use appropriate generation
strategies for order IDs. See the corresponding commented-out DAO definitions
in the context XML files. WARNING: As of Spring 1.0 M4, only HSQLDB will be
properly tested. We are happy to accept any feedback on other databases.
注意WEB-INF/dataAccessContext-*.xml文件也许需要为某些数据库,例如MS-SQL and Oracle 提供适配器,以使用合适的序列ID生成策略。查看相应的在上下文XML文件中注释掉的DAO定义。注意:在Spring 1.0 M4,只有HSQLDB 被合适的测试过。我们很高兴接受任何的其他数据库的反馈。
A guide to step-by-step deployment, assuming JDK 1.4.x and Tomcat 4.x:
1. if not already set, set the JAVA_HOME environment variable
2. run "ant warfile" respectively "warfile.bat" to generate the WAR file
3. copy the generated "dist/jpetstore.war" to Tomcat's "webapps" directory
4. start HSQLDB via "db/hsqldb/server.bat" respectively "server.sh"
5. start Tomcat (default port will be 8080)
6. open "http://localhost:8080/jpetstore" in an Internet browser
If you want to test remote service access:
1. create an order with the JPetStore web UI (first order number will be 1000)
2. adapt server URL in "client/client.properties" (if not using the default)
3. switch to the "client" directory as execution directory
4. run "client.bat 1000" to fetch and show the order with number 1000
5. run "client.bat 1000 10" to fetch the order 10 times per protocol
一个手把手部署的指导,假设JDK 1.4.x Tomcat 为4.x
1.如果没有设置,请设置JAVA_HOME 环境变量。
2.运行"ant warfile" 各自的"warfile.bat" 来生成WAR 文件
3.拷贝生成的"dist/jpetstore.war"到Tomcat的webapps目录
4.启动HSQLDB 通过db/hsqldb/server.bat 或者 "server.sh"
5.启动tomcat
6.打开浏览器 "http://localhost:8080/jpetstore"
如果你想测试远程服务访问
1.通过JPetStore web接口创建订单
2.在"client/client.properties" 配置服务器地址
3.切换到 "client" 目录作为执行目录
4.运行 "client.bat 1000" 获得并展示数据为1000的订单
5.运行 "client.bat 1000 10" 获得数据为1000的订单 10次
分享到:
相关推荐
学习Spring 的例子JpetStore
spring附带的例子 jpetstore 包括spring mvc 和 struts
NULL 博文链接:https://jnh.iteye.com/blog/452766
用spring改造的jpetstore4.0,适用于jdk7+,tomcat6+。mysql数据库
最新spring带的JPetStore的MyEclipse项目,包括了数据库,可用hsqldb直接运行,可以直接导入MyEclipse中并部署运行。 在Myeclipse里新建一个web项目,导入shopping项目即可,数据库在db文件夹里
本例子经过修改,配置,组装成了一个可直接部署运行,不需要修改的demo,是学习spring ibatis struts 的一个非常好的例子。绝对好东西!!尽情下吧!!!
spring自带的JPetStore,我已经配置好(数据库也配置好,用的是hsqldb),可以直接导 入eclipse中运行。共3个压缩包
spring的jpetstore实例,可以直接用myeclipse打开的工程,里面含有建数据库的文件。
spring jpetstorespring jpetstorespring jpetstorespring jpetstorespring jpetstorespring jpetstore
这是使用Struts+Spring+Hibernate实现jpetstore的功能的源代码
jpetstore学习j2ee的好资料,可以学到很多的设计模式
NULL 博文链接:https://tgwall163.iteye.com/blog/1219314
NULL 博文链接:https://ritaleo.iteye.com/blog/723394
该jpetstore经典案例为最新SPRING开发包里面的完全案例,并集成到eclipse里面了,在eclipse里面可以直接运行并调试,在工作目录里面直接建立jpetstore目录,自动导入该目录下文件,修改jdbc.properties配置文件,连接...
在原有的JPetStore5.0的基础上修改,数据持久层用hibernate替换原有的ibatis;添加Spring框架。
用jpetstore学习架构 使用Spring boot+MyBatis +MySQL
spring自带的JPetStore,我已经配置好(数据库也配置好,用的是hsqldb),可以直接导 入eclipse中运行。共3个压缩包
一个非常好的用于学习java web开发的例子,例子简单,但包含的技术非常全面,里面影射出很规范的编程思想,对原spring示例jpetstore的全面改造。使用spring,struts2,hibernate框架,而非ibatis,spring,spring-mvc,现...
myeclipse些测试运行成功
eclipse环境下spring框架的宠物商店的例子目录结构~