关于本文
-
本文是一篇 基于 Hibernate Spring 开源框架的 JAVA 企业应用的设计与实现说明书
-
本文采用 纯 开源技术 : 从基础的 load balancer 到 Base64 工具性的代码
-
本文面象一线工程师,内容布满源代码
-
本文不适合 JAVA 初学者,起码要使用 Spring, Hibernate 写过至少一个实际的项目
-
本文不会是老练的设计师的菜肴
-
本文以 hjpetstore2.0 为例展开
获取 Hjpetstore 源代码
check out hjpetstore2 source code
Hjpetstore 配置与部署
Assumptions:
-
you have check out hjpetstore2 source code
-
you have installed maven
-
you have installed glassfish and set it up according to Create GlassFish JNDI resource for hjpetstore 2.0
-
you have completed the task described in hjpetstore2.0/src/main/resources/conf/maven-readme.txt
(install two jar into local maven repository as they are not available in open community maven repositories)
Steps:
-
cd to the checkout folder
cd /home/pprun/cvsout/hjpetstore/hjpetstore2/
-
mvn clean package -Dmaven.test.skip=true
depends on the status of your network, it may take a while to finish at first time
-
start GlassFish default domain
/home/pprun/java/glassfish-3.0.1/bin/asadmin start-domain
-
deploy it by:
pprun@pprun-laptop:/home/pprun/java/glassfish-3.0.1/bin/asadmin deploy target/hjpetstore.war
-
access the application in browser: http://localhost:8080/
BTW, to undeploy it:
pprun@pprun-laptop:asadmin undeploy