第1章:环境搭建与ElementUI-01-环境搭建
目录第1章 项目概述和环境搭建1. 项目概述1.1 项目介绍1.2 项目展示1.3 技术架构1.4 功能架构1.5 软件开发流程2. 环境搭建2.1 项目结构2.2 maven项目搭建2.2.1 health_parent2.2.2 health_common2.2.5 health_interface2.2.6 health_service_provider2.2.7 health_backend第1章 项目概述和环境搭建1. 项目概述1.1 项目介绍随着国家对医疗健康政策的调整越来越多的新兴健康管理机构涌现大批的创业者和传统医疗公司纷纷加入健康管理机构的业务不能快速的成型投入产出不成比例等问题逐渐浮现。而健康管理系统应运而生能够充分解决这些问题。1.2 项目展示运行项目展示项目完整功能。1.3 技术架构1.4 功能架构1.5 软件开发流程软件开发一般会经历如下几个阶段整个过程是顺序展开所以通常称为瀑布模型。2. 环境搭建2.1 项目结构本项目采用maven分模块开发方式即对整个项目拆分为几个maven工程每个maven工程存放特定的一类代码具体如下health_parent父工程打包方式为pom同时聚合其他子模块便于统一执行maven命令health_common通用模块打包方式为jar 存放项目中使用到的一些工具类、实体类、返回结果和常量类health_interface打包方式为jar存放服务接口health_service_providerDubbo服务模块打包方式为war存放服务实现类、Dao接口、Mapper映射文件等作为服务提供方需要部署到tomcat运行health_backend健康管理后台打包方式为war作为Dubbo服务消费方存放Controller、HTML页面、js、css、SpringBoot配置文件等需要部署到tomcat运行health_mobile移动端前台打包方式为war作为Dubbo服务消费方存放Controller、HTML页面、js、css、SpringBoot配置文件等需要部署到tomcat运行2.2 maven项目搭建通过前面的项目功能架构图可以知道本项目分为健康管理后台和健康管理前台微信端2.2.1 health_parent创建health_parent父工程打包方式为pom用于统一管理依赖版本选择的SpringBoot版本可以在创建完成后在pom文件中更改版本号。pom.xml?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd modelVersion4.0.0/modelVersion groupIdcom.liusp/groupId artifactIdhealth_parent/artifactId version0.0.1-SNAPSHOT/version namehealth_parent/name !--设置为pom父工程-- packagingpom/packaging descriptionDemo project for Spring Boot/description !--子项目聚合-- modules modulehealth_common/module modulehealth_interface/module modulehealth_backend/module modulehealth_mobile/module modulehealth_service_provider/module modulespring_security_demo/module /modules /project2.2.2 health_common创建health_common子工程打包方式为jar存放通用组件例如工具类、实体类等选择的SpringBoot版本可以在创建完成后在pom文件中更改版本号。选哪个版本可以在工程创建完成后修改版本号pom.xml?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd parent groupIdcom.liusp/groupId artifactIdhealth_parent/artifactId version0.0.1-SNAPSHOT/version !--relativePath/ lt;!ndash; lookup parent from repository ndash;gt;-- /parent modelVersion4.0.0/modelVersion groupIdcom.liusp/groupId artifactIdhealth_common/artifactId version0.0.1-SNAPSHOT/version namehealth_common/name packagingjar/packaging descriptionDemo project for Spring Boot/description properties java.version1.8/java.version /properties dependencies dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-web/artifactId version2.3.7.RELEASE/version /dependency dependency groupIdorg.apache.poi/groupId artifactIdpoi/artifactId version3.14/version /dependency dependency groupIdcom.qiniu/groupId artifactIdqiniu-java-sdk/artifactId version7.7.0/version /dependency dependency groupIdorg.apache.poi/groupId artifactIdpoi-ooxml/artifactId version3.14/version /dependency !--阿里云短信-- dependency groupIdcom.aliyun/groupId artifactIdaliyun-java-sdk-core/artifactId version3.3.1/version /dependency dependency groupIdcom.aliyun/groupId artifactIdaliyun-java-sdk-dysmsapi/artifactId version1.0.0/version /dependency !--腾讯云短信-- dependency groupIdcom.tencentcloudapi/groupId artifactIdtencentcloud-sdk-java/artifactId version3.1.62/version!-- 注这里只是示例版本号请获取并替换为 最新的版本号 -- /dependency !--freemarker-- dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-freemarker/artifactId version2.3.7.RELEASE/version /dependency dependency groupIdcom.lowagie/groupId artifactIditext/artifactId version2.1.7/version /dependency !--jasperreports报表生成工具-- dependency groupIdnet.sf.jasperreports/groupId artifactIdjasperreports/artifactId version6.8.0/version !--排除itext,jar读取-- exclusions exclusion groupIdcom.lowagie/groupId artifactIditext/artifactId /exclusion /exclusions /dependency !--文件上传-- dependency groupIdcommons-codec/groupId artifactIdcommons-codec/artifactId version1.10/version /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version3.8.1/version configuration source1.8/source target1.8/target encodingUTF-8/encoding /configuration /plugin /plugins /build /project2.2.5 health_interface创建health_interface子工程打包方式为jar存放服务接口pom.xml?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd modelVersion4.0.0/modelVersion parent groupIdcom.liusp/groupId artifactIdhealth_parent/artifactId version0.0.1-SNAPSHOT/version !--relativePath/ lt;!ndash; lookup parent from repository ndash;gt;-- /parent groupIdcom.liusp/groupId artifactIdhealth_interface/artifactId version0.0.1-SNAPSHOT/version namehealth_interface/name packagingjar/packaging descriptionDemo project for Spring Boot/description properties java.version1.8/java.version /properties dependencies dependency groupIdcom.liusp/groupId artifactIdhealth_common/artifactId version0.0.1-SNAPSHOT/version /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version3.8.1/version configuration source1.8/source target1.8/target encodingUTF-8/encoding /configuration /plugin /plugins /build /project2.2.6 health_service_provider创建health_service_provider子工程打包方式为war作为服务单独部署存放服务类、Dao接口和Mapper映射文件等选择的SpringBoot版本可以在创建完成后在pom文件中更改版本号。pom.xml?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd parent groupIdcom.liusp/groupId artifactIdhealth_parent/artifactId version0.0.1-SNAPSHOT/version !--relativePath/ lt;!ndash; lookup parent from repository ndash;gt;-- /parent modelVersion4.0.0/modelVersion groupIdcom.liusp/groupId artifactIdhealth_service_provider/artifactId version0.0.1-SNAPSHOT/version packagingwar/packaging namehealth_service_provider/name descriptionDemo project for Spring Boot/description properties java.version1.8/java.version project.build.sourceEncodingUTF-8/project.build.sourceEncoding project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding spring-boot.version2.3.7.RELEASE/spring-boot.version /properties dependencies dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-web/artifactId /dependency dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-tomcat/artifactId scopeprovided/scope /dependency dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-test/artifactId scopetest/scope exclusions exclusion groupIdorg.junit.vintage/groupId artifactIdjunit-vintage-engine/artifactId /exclusion /exclusions /dependency !--MyBatis依赖-- !--mysql-- dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId !--加了scope会导致application.yml文件报红但不影响操作可加可不加不加application.yml文件不会报红-- !--scoperuntime/scope-- version5.1.49/version /dependency !--mybatis-- dependency groupIdorg.mybatis.spring.boot/groupId artifactIdmybatis-spring-boot-starter/artifactId version2.1.3/version /dependency !--阿里数据源-- !-- https://mvnrepository.com/artifact/com.alibaba/druid -- dependency groupIdcom.alibaba/groupId artifactIddruid/artifactId version1.2.6/version /dependency !-- druid使用log4j记录日志切换为slf4j -- dependency groupIdorg.slf4j/groupId artifactIdlog4j-over-slf4j/artifactId version1.7.25/version /dependency !--Dubbo集成SpringBoot起步依赖-- dependency groupIdcom.alibaba.spring.boot/groupId artifactIddubbo-spring-boot-starter/artifactId version2.0.0/version /dependency !--zkclient zookeeper客户端-- dependency groupIdcom.101tec/groupId artifactIdzkclient/artifactId version0.10/version /dependency dependency groupIdcom.liusp/groupId artifactIdhealth_interface/artifactId version0.0.1-SNAPSHOT/version /dependency !--分页插件-- dependency groupIdcom.github.pagehelper/groupId artifactIdpagehelper-spring-boot-starter/artifactId version1.2.5/version /dependency !-- 引入redis-- dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-data-redis/artifactId /dependency /dependencies dependencyManagement dependencies dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-dependencies/artifactId version${spring-boot.version}/version typepom/type scopeimport/scope /dependency /dependencies /dependencyManagement build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version3.8.1/version configuration source1.8/source target1.8/target encodingUTF-8/encoding /configuration /plugin plugin groupIdorg.springframework.boot/groupId artifactIdspring-boot-maven-plugin/artifactId version2.3.7.RELEASE/version configuration mainClasscom.liusp.HealthServiceProviderApplication/mainClass /configuration executions execution idrepackage/id goals goalrepackage/goal /goals /execution /executions /plugin /plugins /build /projectapplication.yml# 应用名称 server: port: 81 spring: datasource: username: root password: root url: jdbc:mysql://localhost:3306/health?characterEncodingUTF-8 driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource #数据源其他配置 initialSize: 5 minIdle: 5 maxActive: 20 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true #配置监控统计拦截的filters去掉后监控界面sql无法统计wall用于防火墙 filters: stat,wall,log4j maxPoolPreparedStatementPerConnectionSize: 20 useGlobalDataSourceStat: true connectionProperties: druid.stat.mergeSqltrue;druid.stat.slowSqlMillis500 jackson: date-format: yyyy-MM-dd time-zone: GMT8 #redis配置 redis: host: 127.0.0.1 freemarker: # 模板后缀名 suffix: .ftl # 文档类型 content-type: text/html # 页面编码 charset: UTF-8 # 页面缓存 cache: false # 模板路径 template-loader-path: classpath:/templates/ #freemarker文件输出地址 out_put_path: D:/IdeaProjects9/health_parent/health_mobile/src/main/resources/static/pages mybatis: # 指定全局配置文件位置 config-location: classpath:mybatis/mybatis-config.xml # 指定sql映射文件位置 mapper-locations: classpath:mybatis/mapper/*.xml type-aliases-package: com.liusp.pojo,com.liusp.entity #dubbo dubbo: #设置服务器应用名称 application: name: health_service_provider #指定注册中心 registry: address: zookeeper://127.0.0.1:2181 #指定通讯协议和端口,指定暴露服务的端口如果不指定默认为20880 protocol: port: 20888 name: dubbo #添加monitor监控 monitor: registry #分页插件配置 pagehelper: helper-dialect: mysql reasonable: true support-methods-arguments: true params: countcounSql #显示日志 logging: level: com.liusp: debug在src\main\resources\ 目录下新建mybatis目录并创建mybatis-config.xml文件?xml version1.0 encodingUTF-8 ? !DOCTYPE configuration PUBLIC -//mybatis.org//DTD Config 3.0//EN http://mybatis.org/dtd/mybatis-3-config.dtd configuration settings !--设置myBatis全局配置采用驼峰命名法 -- setting namemapUnderscoreToCamelCase valuetrue/ /settings /configuration创建项目的web.xml文件2.2.7 health_backend创建health_backend子工程打包方式为war单独部署存放Controller、页面等选择的SpringBoot版本可以在创建完成后在pom文件中更改版本号。pom.xml?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd parent groupIdcom.liusp/groupId artifactIdhealth_parent/artifactId version0.0.1-SNAPSHOT/version !--relativePath/ lt;!ndash; lookup parent from repository ndash;gt;-- /parent modelVersion4.0.0/modelVersion groupIdcom.liusp/groupId artifactIdhealth_backend/artifactId version0.0.1-SNAPSHOT/version packagingwar/packaging namehealth_backend/name descriptionDemo project for Spring Boot/description properties java.version1.8/java.version project.build.sourceEncodingUTF-8/project.build.sourceEncoding project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding spring-boot.version2.3.7.RELEASE/spring-boot.version /properties dependencies dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-web/artifactId /dependency dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-tomcat/artifactId scopeprovided/scope /dependency dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-test/artifactId scopetest/scope exclusions exclusion groupIdorg.junit.vintage/groupId artifactIdjunit-vintage-engine/artifactId /exclusion /exclusions /dependency !--Dubbo集成SpringBoot起步依赖-- dependency groupIdcom.alibaba.spring.boot/groupId artifactIddubbo-spring-boot-starter/artifactId version2.0.0/version /dependency !--zkclient zookeeper客户端-- dependency groupIdcom.101tec/groupId artifactIdzkclient/artifactId version0.10/version /dependency dependency groupIdcom.liusp/groupId artifactIdhealth_interface/artifactId version0.0.1-SNAPSHOT/version /dependency !-- 引入redis-- dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-starter-data-redis/artifactId /dependency !--文件上传-- dependency groupIdcommons-fileupload/groupId artifactIdcommons-fileupload/artifactId version1.3.3/version /dependency /dependencies dependencyManagement dependencies dependency groupIdorg.springframework.boot/groupId artifactIdspring-boot-dependencies/artifactId version${spring-boot.version}/version typepom/type scopeimport/scope /dependency /dependencies /dependencyManagement build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version3.8.1/version configuration source1.8/source target1.8/target encodingUTF-8/encoding /configuration /plugin plugin groupIdorg.springframework.boot/groupId artifactIdspring-boot-maven-plugin/artifactId version2.3.7.RELEASE/version configuration mainClasscom.liusp.HealthBackendApplication/mainClass /configuration executions execution idrepackage/id goals goalrepackage/goal /goals /execution /executions /plugin /plugins /build /projectapplication.ymlserver: port: 82 #dubbo dubbo: #设置服务器应用名称 application: name: health_backend #指定注册中心 registry: address: zookeeper://127.0.0.1:2181 #超时全局设置 10分钟 #checkfalse 不检查服务提供方开发阶段建议设置为false #checktrue 启动时检查服务提供方如果服务提供方没有启动则报错 consumer: timeout: 600000 check: false spring: redis: host: 127.0.0.1 #文件上传 servlet: multipart: enabled: true max-file-size: 10MB max-request-size: 100MB #设置日期格式 jackson: date-format: yyyy-MM-dd time-zone: GMT8创建项目的web.xml文件

相关新闻

第7章:页面静态化-01-页面静态化Freemaker

第7章:页面静态化-01-页面静态化Freemaker

健康管理项目 第7章1. 页面静态化介绍本章课程中我们已经实现了移动端套餐列表页面和套餐详情页面的动态展示。但是我们需要思考一个问题,就是对于这两个页面来说,每次用户访问这两个页面都需要查询数据库获取动态数据进行展示,而且这两个页面…

2026/11/16 2:19:54 阅读更多 →
揭秘郑州网站建设专家背后的真实逻辑与未来趋势

揭秘郑州网站建设专家背后的真实逻辑与未来趋势

在这个移动互联网几乎渗透到生活每一个毛孔的时代,一家公司的官网早已不再是仅仅摆在那里充门面的电子名片,它是企业在数字世界的基石,是24小时不休假的销售冠军,更是品牌灵魂的直接载体。提到“郑州网站建设专家”,很多人脑海中可能浮现出的是那些冷冰冰的代码、晦涩难懂…

2026/11/16 2:19:54 阅读更多 →
洛雪音乐音源完整指南:免费解锁全网无损音乐的终极方案

洛雪音乐音源完整指南:免费解锁全网无损音乐的终极方案

洛雪音乐音源完整指南:免费解锁全网无损音乐的终极方案 【免费下载链接】lxmusic- lxmusic(洛雪音乐)全网最新最全音源 项目地址: https://gitcode.com/gh_mirrors/lx/lxmusic- 想要在洛雪音乐中免费享受酷我、酷狗、QQ音乐、网易云、咪咕等平台的高品质音乐…

2026/11/16 2:19:55 阅读更多 →

最新新闻

Electron桌面应用开发实战:从环境搭建到打包发布全流程

Electron桌面应用开发实战:从环境搭建到打包发布全流程

做前端这些年,我大部分时间都在跟浏览器标签页打交道,直到第一次把桌面应用跑起来,才发现原来自己一直被限制在地址栏和刷新按钮围起来的框框里。Electron这个词,最开始是在某段时间频繁出现在同事的讨论里,一个用HTML…

2026/11/17 8:22:52 阅读更多 →
滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

简介:亚太天能T109滑盖智能锁产品说明书是一份PDF格式的官方技术文档,主要面向智能锁安装人员、终端用户及售后维护者,帮助快速掌握产品安装、配置与常见故障处理。全包仅1个PDF文件,大小4.37MB,内容结构清晰&#xff…

2026/11/17 12:46:04 阅读更多 →
PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

上个月我在调试一台高速AGV的驱动系统,整车要求空载跑到8m/s,电机转速已经拉到额定点,驱动器的输出电压也顶到了母线电压极限附近。再往上踩速度指令,转速纹丝不动,三相电流反而开始震荡。那会儿我的第一反应就是&…

2026/11/17 12:46:04 阅读更多 →
C++核心知识点:从内存管理到STL的实战指南

C++核心知识点:从内存管理到STL的实战指南

C 这门语言我前前后后折腾了十几年,用它写过嵌入式驱动、做过游戏服务端,也搭过基础组件库。每次看到新人一头扎进"C 核心知识点"这个搜索词,我其实挺感慨的——这门语言的难点从来不是语法多,而是知识点之间的耦合太深…

2026/11/17 11:26:33 阅读更多 →
T109滑盖智能锁怎么装?安装调试与故障排查全攻略

T109滑盖智能锁怎么装?安装调试与故障排查全攻略

简介:亚太天能T109滑盖智能锁产品说明书以PDF格式发布,适合智能锁用户、安装人员与售后维修人员阅读。内容围绕T109系列指纹密码刷卡锁展开,先介绍前面板、后面板、锁体、机械钥匙、电池盒盖等部件名称与功能,再给出完整安装步骤&…

2026/11/17 12:46:05 阅读更多 →
LLM知识降熵:从信息垄断到理解权下放

LLM知识降熵:从信息垄断到理解权下放

你有没有过这种经历:翻开源码注释、论文摘要或者一份专业报告,每个字都认识,连在一起却像天书。想找人聊聊,身边要么没人懂,要么懂的懒得跟你解释。后来我试着把同一段内容丢给一个大语言模型,几秒钟之后&a…

2026/11/17 12:46:05 阅读更多 →

日新闻

周新闻

月新闻