内容提要 ·运行起Jpetstore ·Jpetstore源码解析 ·Spring loC ·Spring MVC ·实习项目分析
内容提要 • 运行起Jpetstore • Jpetstore源码解析 • Spring IoC • Spring MVC • 实习项目分析
运行Jpetstore ·搭建环境 -下载安装jdk -下载安装SpringSource Tool Suite ·下载subversion插件 一下载Jpetstore源码 ·编译、打包、部署
运行Jpetstore • 搭建环境 – 下载安装jdk – 下载安装SpringSource Tool Suite • 下载subversion插件 – 下载Jpetstore源码 • 编译、打包、部署
下载subversion插件 。Eclipse Plugin -http://www.eclipse.org/subversive/downloads.ph 力 Help->Install New Software -Update site http://download.eclipse.org/technology/subversive/0.7 /update-site/ ·SpringByExample
下载subversion插件 • Eclipse Plugin – http://www.eclipse.org/subversive/downloads.ph p – Help->Install New Software – Update site • http://download.eclipse.org/technology/subversive/0.7 /update-site/ • SpringByExample
下载jpetstore源码 。SpringSource.org -https://src.springsource.org/svn/spring-samples/ 一 svn co https://src.springsource.org/svn/spring- samples/jpetstore/trunk/org.springframework.sa mples.jpetstore/jpetstore -Use subversion plugin SpringByExample
下载jpetstore源码 • SpringSource.org – https://src.springsource.org/svn/spring-samples/ – svn co https://src.springsource.org/svn/spring- samples/jpetstore/trunk/org.springframework.sa mples.jpetstore/ jpetstore – Use subversion plugin • SpringByExample
编译、打包源码 ·Maven -http://maven.apache.org/ -STS已经集成Maven插件 ·Project Object Model -pom.xml validate,compile,test,package,integration-test, verify,install,deploy
编译、打包源码 • Maven – http://maven.apache.org/ – STS已经集成Maven插件 • Project Object Model – pom.xml – validate, compile, test, package, integration-test, verify, install, deploy
编译、打包源码 Jpetstore readme.txt -1.Run "mvn package"to generate the WAR file -2.Copy the generated "target/org.springframework.samples.jpetstore-1.0.0- SNAPSHOT.war to "/webapps/jpetstore.war" -3.Start HSQLDB via "db/hsqldb/server.bat"or "db/hsqldb/server.sh" -4.Start Tomcat (default port will be 8080) -5.Open "http://localhost:8080/jpetstore"in an Internet browser
编译、打包源码 • Jpetstore readme.txt – 1. Run "mvn package" to generate the WAR file – 2. Copy the generated "target/org.springframework.samples.jpetstore-1.0.0- SNAPSHOT.war" to “/webapps/jpetstore.war" – 3. Start HSQLDB via "db/hsqldb/server.bat" or "db/hsqldb/server.sh" – 4. Start Tomcat (default port will be 8080) – 5. Open "http://localhost:8080/jpetstore" in an Internet browser