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宠物医院---安装的更多相关文章

  1. Eclipse Spring Tool Suite插件安装

    目录 Eclipse Spring Tool Suite插件安装 Eclipse Spring Tool Suite插件安装 1.登录网址:http://spring.io/tools/sts/all ...

  2. Eclipse的Spring IDE插件的安装和使用

    Spring IDE是Spring官方网站推荐的Eclipse插件,可提供在研发Spring时对Bean定义文件进行验证并以可视化的方式查看各个Bean之间的依赖关系等. 安装 使用Eclipse M ...

  3. 1. Spring 简介以及关于 Eclipse 的 Spring Tool Suite 插件安装

    今天开始学 Spring 了,就先来认识一下什么是 Spring 吧. 1. 首先,Spring 是一个框架,而且是开源的. 2. Spring 为简化企业级应用开发而生.使用 Spring 可以使简 ...

  4. Spring的下载与安装

    Spring是一个独立的框架,不依赖于任何Web服务器或容器.它既可在独立的JavaSE项目中使用,也可以在Java Web项目中使用. 下载和安装Spring框架可按如下步骤进行: 1.登录http ...

  5. Eclipse 下Spring cloud项目集成开发插件Spring Tool Suite (STS) 安装

    安装eclipse插件 Help->Eclipse Marketplace-> Search中查找"Spring Tool Suite (STS) for Eclipse&quo ...

  6. Spring Tool Suite(STS)安装

    Spring Tool Suite是一个基于Eclipse的开发环境,可以自定义用于开发Spring应用程序.它提供了一个随时可用的环境来实现,调试,运行和部署Spring应用程序,包括Pivotal ...

  7. Spring Boot环境的安装

    Eclipse 使用springboot框架 环境的安装 1.下载java1.8 ,安装并配置环境变量 环境变量增加java 的安装目录到环境变量中path中增加 %JAVA_HOME%/bin增加变 ...

  8. 【转】Spring 的下载、安装和使用

    一.下载 Spring 下载地址:http://repo.spring.io/libs-release-local/org/springframework/spring/4.0.6.RELEASE/  ...

  9. Spring 的下载、安装和使用

    一.下载 Spring 下载地址:http://repo.spring.io/libs-release-local/org/springframework/spring/4.0.6.RELEASE/  ...

随机推荐

  1. UNIX标准化及实现之限制

    前言 UNIX系统实现定义了很多幻数和常量,其中有很多已被硬编码(关于硬编码和软编码:http://www.cnblogs.com/chenkai/archive/2009/04/10/1432903 ...

  2. 关于使用NotificationComat导致android2.3及以下版本无法显示自定义布局的解决方法.

    大伙都知道 android-support-v4为我们提供了很多兼容的解决方案, 其中就有关于通知栏的. NotificationCompat, 顺利成章操刀显示通知. eg: Intent inte ...

  3. java_SSH整合1

    Domain: public class Department { private Long id; private Set<User> users = new HashSet<Us ...

  4. Http Message Converters with the Spring Framework--转载

    原文:http://www.baeldung.com/spring-httpmessageconverter-rest 1. Overview This article describes how t ...

  5. android网络请求之POST方法

    package com.jredu.helloworld.activity; import android.os.Bundle; import android.os.Handler; import a ...

  6. find & rm

    1)查找并删除3天前的历史文件 rm -rfi `find /tmp/ -ctime 3` 2)按分钟查找 find -cmin N

  7. Angular学习资源汇集

    网站 官网:www.angularjs.org 中文官网(社区):www.angularjs.cn 博客 流浪猫的窝 粉丝日记:AngularJS体验式编程系列文章 一介布衣 文档 GitCafe A ...

  8. 有关ftp4j的FTPListParseException异常

    昨天换了个ftp服务器,发现程序出现了异常it.sauronsoftware.ftp4j.FTPListParseException,网上搜了下,说是FTPClient.list()时it.sauro ...

  9. 编写SASS的一些技巧

    更好的为变量命名 变量是Sass中最简单的特性之一,但有时候也会使用不当.创建站点范围内有语义化的变量,是不可或缺的工作.如果命名不好,他会变得难以理解和重复使用. 这里有一些命名变量的小技巧,提供参 ...

  10. <转>HTML+CSS总结/深入理解CSS盒子模型

    原文地址:http://www.chinaz.com/design/2010/1229/151993.shtml 前言:前阵子在做一个项目时,在页面布局方面遇到了一点小问题,于是上stackoverf ...