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 Boot宠物医院管理系统设计与实现
基于Spring Boot的宠物医院管理系统设计与实现
基于Spring Boot的宠物医院管理系统的设计
(附源码)spring boot宠物医院管理系统 毕业设计 180923
Spring
Spring Boot 日志
构建便捷高效的宠物医疗预约服务平台:基于Spring Boot的实现本文介绍了基于Spring Boot的宠物医疗预约服
构建便捷高效的宠物医疗预约服务平台:基于Spring Boo
宠物医院系统资源
构建便捷高效的宠物医疗预约服务平台:基于Spring Boot的实现
网址: Spring PecClinic宠物医院 https://m.mcbbbk.com/newsview581237.html
上一篇: 宠物服务App功能简介 |
下一篇: Java学习之多态二 |