Spring PecClinic宠物医院---安装
1、下载源代码
如果本地安装了Git工具,可以直接使用命令
git clone https://github.com/spring-projects/spring-petclinic.git
如果没有Git工具,需要到https://github.com/spring-projects/spring-petclinic下载源码包
2、将petclinic工程导入Eclipse
3、petclinic默认使用HsqlDB,我本地只有Mysql数据库,因此需要配置数据库链接信息,具体有以下两个地方
(1)修改pom.xml,去掉对Mysql的依赖项目的注释
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
(2)修改data-access.properties
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/happycardata?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
jdbc.username=root
jdbc.password=123456
# Properties that control the population of schema and data for a new data source
jdbc.initLocation=classpath:db/mysql/initDB.sql
jdbc.dataLocation=classpath:db/mysql/populateDB.sql
# Property that determines which Hibernate dialect to use
# (only applied with "applicationContext-hibernate.xml")
hibernate.dialect=org.hibernate.dialect.MySQLDialect
# Property that determines which database to use with an AbstractJpaVendorAdapter
jpa.database=MYSQL
jpa.showSql=true
3、对整个工程进行Maven install,确保install执行成功
4、启动tomcat,访问http://localhost:8080/petclinic/
这时候应该可以看到两只活泼可爱的小狗狗了

宠物医院业务上设计比较简单,主要有三个角色:宠物pets、医生veterinarians、主人owner。
主要的关系有两个:
(1)一个主人可以拥有多个宠物
(2)一个主人可以多次问诊记录
Spring PecClinic宠物医院---安装的更多相关文章
- Eclipse Spring Tool Suite插件安装
目录 Eclipse Spring Tool Suite插件安装 Eclipse Spring Tool Suite插件安装 1.登录网址:http://spring.io/tools/sts/all ...
- Eclipse的Spring IDE插件的安装和使用
Spring IDE是Spring官方网站推荐的Eclipse插件,可提供在研发Spring时对Bean定义文件进行验证并以可视化的方式查看各个Bean之间的依赖关系等. 安装 使用Eclipse M ...
- 1. Spring 简介以及关于 Eclipse 的 Spring Tool Suite 插件安装
今天开始学 Spring 了,就先来认识一下什么是 Spring 吧. 1. 首先,Spring 是一个框架,而且是开源的. 2. Spring 为简化企业级应用开发而生.使用 Spring 可以使简 ...
- Spring的下载与安装
Spring是一个独立的框架,不依赖于任何Web服务器或容器.它既可在独立的JavaSE项目中使用,也可以在Java Web项目中使用. 下载和安装Spring框架可按如下步骤进行: 1.登录http ...
- Eclipse 下Spring cloud项目集成开发插件Spring Tool Suite (STS) 安装
安装eclipse插件 Help->Eclipse Marketplace-> Search中查找"Spring Tool Suite (STS) for Eclipse&quo ...
- Spring Tool Suite(STS)安装
Spring Tool Suite是一个基于Eclipse的开发环境,可以自定义用于开发Spring应用程序.它提供了一个随时可用的环境来实现,调试,运行和部署Spring应用程序,包括Pivotal ...
- Spring Boot环境的安装
Eclipse 使用springboot框架 环境的安装 1.下载java1.8 ,安装并配置环境变量 环境变量增加java 的安装目录到环境变量中path中增加 %JAVA_HOME%/bin增加变 ...
- 【转】Spring 的下载、安装和使用
一.下载 Spring 下载地址:http://repo.spring.io/libs-release-local/org/springframework/spring/4.0.6.RELEASE/ ...
- Spring 的下载、安装和使用
一.下载 Spring 下载地址:http://repo.spring.io/libs-release-local/org/springframework/spring/4.0.6.RELEASE/ ...
随机推荐
- 1081. Rational Sum (20)
the problem is from PAT,which website is http://pat.zju.edu.cn/contests/pat-a-practise/1081 the code ...
- C++_快速排序(纯C版本)
//比较大小 static int compare_int(const void *int1,const void *int2) { if(*(const int*)int1>*(const i ...
- Qt focusoutevent 不响应的解决方法
一般利用focus(焦点)来实现弹窗自动关闭效果. Qt的focus貌似是自己的bug, 经常无法接收到focusout的事件 例如: widgetA 中执行 widgetB->show(); ...
- C. Guess Your Way Out!
C. Guess Your Way Out! time limit per ...
- cocos2d-x使用ant打包
1. 下载apache-ant-1.9.3,然后添加环境变量ANT_HOME = D:\dev_envir\apache-ant-1.9.3(你自己的ant根目录),再在path中添加路径:%ANT_ ...
- 在openshift上使用django+postgresql
openshift上用的是django 1.7,数据库选择的是postgresql 9.2 本地开发用的是sqlite3数据库,发布到openshift上后是没有数据的(本地的sqlite3数据库里的 ...
- ArcGIS Server 10.2 实战(五)spatial etl tool 格式转换服务
上不同的地图服务平台对地图文件格式的要求多种多样,arcgis使用的文件很难应用于其他平台上,因此需要有格式转换的服务来克服这种使用不同平台带来的麻烦,下面以TIFF格式转GEOTIFF格式为例. 首 ...
- [改善Java代码]构造代码块会想你所想
建议37: 构造代码块会想你所想 镜像博文:http://www.cnblogs.com/DreamDrive/p/5413408.html http://www.cnblogs.com/DreamD ...
- [未完成]WebService学习第一天学习笔记
[未完成]WebService学习第一天学习笔记[未完成]WebService学习第一天学习笔记
- 【KMP原理】【整理回顾】
今儿套KMP模板做了个题,敏敏找我讲next[]数组的时候把我问懵了.具体原理都记不清了光靠模板凑得了一时凑不了一世啊,所以再捋一捋顺一顺,这次印象要深刻一点了: KMP与暴力匹配的优化区别就不再提了 ...