传智健康管理系统是一款应用于健康管理机构的业务系统,实现健康管理机构工作内容可视化、会员管理专业化、健康评估数字化、健康干预流程化、知识库集成化,从而提高健康管理师的工作效率,加强与会员间的互动,增强管理者对健康管理机构运营情况的了解。
前端技术栈:htmls;bootstrap;elementui;Vue.js;ajax
分布式架构及 权限技术栈:zookeeper+dubbo;SpringMVC;SpringSecurity
分布式版本控制及报表技术栈:
Git;ApachePOI(处理Excel表格);Echarts(图形报表)
持久化技术栈:
Mybatis;MySQL
第三方服务:
阿里云通信(短信服务);七牛云(存储服务);微信开发平台(公众号)等
具体如下图所示:
传智健康项目主要分管理后台和管理前端(移动端),具体功能架构如下图所示。
在项目开发中,了解软件开发流程是十分必要的。瀑布模型如下图所示。
本项目采用maven分模块开发方式,即对整个项目拆分为几个maven工程,每个maven工程存放特定的一类代码,具体如下:
各模块职责定位:
health_parent:父工程,打包方式为pom,统一锁定依赖的版本,同时聚合其他子模块便于统一执行maven命令
health_common:通用模块,打包方式为jar,存放项目中使用到的一些工具类和常量类
health_pojo:打包方式为jar,存放实体类和返回结果类等
health_dao:持久层模块,打包方式为jar,存放Dao接口和Mapper映射文件等
health_interface:打包方式为jar,存放服务接口
health_service:Dubbo服务模块,打包方式为war,存放服务实现类,作为服务提供方,需要部署到tomcat运行
health_web:打包方式为war,作为Dubbo服务消费方,存放Controller、HTML页面、js、css、spring配置文件等,需要部署到tomcat运行
其pom.xml如下:主要涉及子模块中要用的依赖的版本锁定。
4.0.0
com.itheima
health_parent
1.0-SNAPSHOT
pom
4.12
5.0.5.RELEASE
4.1.4
2.5
2.6.0
3.4.7
0.1
3.4.5
1.3.1
1.2.15
5.1.32
1.0.9
1.3.1
5.0.5.RELEASE
3.14
2.9.0
2.2.1
org.springframework
spring-context
${spring.version}
org.springframework
spring-beans
${spring.version}
org.springframework
spring-web
${spring.version}
org.springframework
spring-webmvc
${spring.version}
org.springframework
spring-jdbc
${spring.version}
org.springframework
spring-aspects
${spring.version}
org.springframework
spring-jms
${spring.version}
org.springframework
spring-context-support
${spring.version}
org.springframework
spring-test
${spring.version}
com.alibaba
dubbo
${dubbo.version}
org.apache.zookeeper
zookeeper
${zookeeper.version}
com.github.sgroschupf
zkclient
${zkclient.version}
junit
junit
4.12
com.alibaba
fastjson
1.2.47
javassist
javassist
3.12.1.GA
commons-codec
commons-codec
1.10
com.github.pagehelper
pagehelper
${pagehelper.version}
org.mybatis
mybatis
${mybatis.version}
org.mybatis
mybatis-spring
${mybatis.spring.version}
com.github.miemiedev
mybatis-paginator
${mybatis.paginator.version}
mysql
mysql-connector-java
${mysql.version}
com.alibaba
druid
${druid.version}
commons-fileupload
commons-fileupload
${commons-fileupload.version}
org.quartz-scheduler
quartz
${quartz.version}
org.quartz-scheduler
quartz-jobs
${quartz.version}
com.sun.jersey
jersey-client
1.18.1
com.qiniu
qiniu-java-sdk
7.2.0
org.apache.poi
poi
${poi.version}
org.apache.poi
poi-ooxml
${poi.version}
redis.clients
jedis
${jedis.version}
org.springframework.security
spring-security-web
${spring.security.version}
org.springframework.security
spring-security-config
${spring.security.version}
org.springframework.security
spring-security-taglibs
${spring.security.version}
com.github.penggle
kaptcha
2.3.2
javax.servlet
javax.servlet-api
dom4j
dom4j
1.6.1
xml-apis
xml-apis
1.4.01
javax.servlet
servlet-api
${servlet-api.version}
provided
org.apache.maven.plugins
maven-compiler-plugin
3.2
1.8
UTF-8
health_common,子工程,打包方式为jar,存放通用组件,例如工具类等,继承父工程health_parent。其pom.xml如下:
health_parent
com.itheima
1.0-SNAPSHOT
4.0.0
health_common
jar
com.github.pagehelper
pagehelper
org.mybatis
mybatis
org.mybatis
mybatis-spring
com.github.miemiedev
mybatis-paginator
mysql
mysql-connector-java
com.alibaba
druid
commons-fileupload
commons-fileupload
org.springframework
spring-context
org.springframework
spring-beans
org.springframework
spring-web
org.springframework
spring-webmvc
org.springframework
spring-jdbc
org.springframework
spring-aspects
org.springframework
spring-jms
org.springframework
spring-context-support
org.springframework
spring-test
com.alibaba
dubbo
org.apache.zookeeper
zookeeper
com.github.sgroschupf
zkclient
junit
junit
com.alibaba
fastjson
javassist
javassist
commons-codec
commons-codec
org.apache.poi
poi
org.apache.poi
poi-ooxml
redis.clients
jedis
com.qiniu
qiniu-java-sdk
com.sun.jersey
jersey-client
org.springframework.security
spring-security-web
org.springframework.security
spring-security-config
org.springframework.security
spring-security-taglibs
子工程,打包方式为jar,存放POJO实体类。继承父工程、依赖health_common。其pom.xml文件如下:
health_parent
com.itheima
1.0-SNAPSHOT
4.0.0
health_pojo
jar
com.itheima
health_common
1.0-SNAPSHOT
创建health_dao,子工程,打包方式为jar,存放Dao接口和Mybatis映射文件。继承父工程、依赖health_pojo。其pom.xml文件如下:
health_parent
com.itheima
1.0-SNAPSHOT
4.0.0
health_dao
jar
com.itheima
health_pojo
1.0-SNAPSHOT
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.err
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### direct messages to file mylog.log ###
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=c:\\mylog.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### set log levels - for more verbose logging change 'info' to 'debug' ###
log4j.rootLogger=debug, stdout
mysql
创建health_interface,子工程,打包方式为jar,存放服务接口,用于dubbo在服务提供者和服务消费者中使用。继承父工程,依赖health_pojo,其pom.xml文件如下:
health_parent
com.itheima
1.0-SNAPSHOT
4.0.0
health_interface
jar
com.itheima
health_pojo
1.0-SNAPSHOT
创建health_service,子工程,打包方式为war,作为服务单独部署,存放服务类。继承父工程、依赖health_interface、health_dao其pom.xml文件如下:
health_parent
com.itheima
1.0-SNAPSHOT
4.0.0
health_service
war
com.itheima
health_interface
1.0-SNAPSHOT
com.itheima
health_dao
1.0-SNAPSHOT
org.apache.tomcat.maven
tomcat7-maven-plugin
81
/
如上
Archetype Created Web Application
contextConfigLocation
classpath*:applicationContext*.xml
org.springframework.web.context.ContextLoaderListener
创建health_web,子工程,打包方式为war,单独部署,存放Controller,继承父工程、依赖health_interface。
health_parent
com.itheima
1.0-SNAPSHOT
4.0.0
health_web
war
com.itheima
health_interface
1.0-SNAPSHOT
org.apache.tomcat.maven
tomcat7-maven-plugin
82
/
WriteMapNullValue
WriteDateUseDateFormat
Archetype Created Web Application
CharacterEncodingFilter
org.springframework.web.filter.CharacterEncodingFilter
encoding
utf-8
forceEncoding
true
CharacterEncodingFilter
/*
springmvc
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:springmvc.xml
1
springmvc
*.do