zheng/README.md

150 lines
7.1 KiB
Markdown
Raw Normal View History

2016-10-22 21:12:19 +08:00
## zheng
2017-01-06 23:26:25 +08:00
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
2017-01-02 20:35:35 +08:00
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/shuzheng/zheng/pulls)
2017-01-06 14:55:07 +08:00
[![GitHub forks](https://img.shields.io/github/forks/shuzheng/zheng.svg?style=social&label=Fork)](https://github.com/shuzheng/zheng)
2016-10-22 21:07:44 +08:00
2017-01-07 22:53:03 +08:00
# 项目组织结构
2016-12-01 11:45:53 +08:00
``` lua
2016-11-12 00:40:57 +08:00
zheng
2016-12-01 11:45:53 +08:00
├── zheng-common -- 公共模块
2017-01-09 16:43:35 +08:00
├── zheng-admin -- 后台管理系统模板基于bootstrap实现的响应式Material Design风格的通用后台管理系统模板
2017-01-05 10:59:44 +08:00
├── zheng-upms -- 用户权限管理系统(网关)
2016-12-24 23:19:16 +08:00
| ├── zheng-upms-dao -- 数据库操作MyBatisGenerator生成
2017-01-07 00:29:56 +08:00
| ├── zheng-upms-sso-client -- SSO客户端依赖包
2016-12-24 23:19:16 +08:00
| ├── zheng-upms-rpc-api -- rpc接口包
| ├── zheng-upms-rpc-service -- rpc服务提供者[端口:1112]
2017-01-07 00:29:56 +08:00
| ├── zheng-upms-app1 -- SSO测试客户端1[端口:1113]
| ├── zheng-upms-app2 -- SSO测试客户端2[端口:1114]
2016-12-09 16:45:18 +08:00
| └── zheng-upms-server -- 系统及SSO服务端[端口:1111]
2016-12-01 11:45:53 +08:00
├── zheng-cms -- 内容管理系统
2016-12-24 23:19:16 +08:00
| ├── zheng-cms-dao -- 数据库操作MyBatisGenerator生成
2017-01-07 21:45:51 +08:00
| ├── zheng-cms-rpc-api -- rpc接口包
| ├── zheng-cms-rpc-service -- rpc服务提供者[端口:2225]
2016-12-01 11:45:53 +08:00
| ├── zheng-cms-service -- 业务逻辑
2016-12-09 16:45:18 +08:00
| ├── zheng-cms-search -- 搜索服务[端口:2221]
| ├── zheng-cms-admin -- 后台管理[端口:2222]
| ├── zheng-cms-job -- 消息队列、任务调度等[端口:2223]
| └── zheng-cms-web -- 网站前台[端口:2224]
2016-12-01 11:45:53 +08:00
├── zheng-pay -- 支付系统
2016-12-24 23:19:16 +08:00
| ├── zheng-pay-dao -- 数据库操作MyBatisGenerator生成
2016-12-01 14:43:49 +08:00
| ├── zheng-pay-service -- 业务逻辑
| ├── zheng-pay-sdk -- 开发工具包
2016-12-09 16:45:18 +08:00
| ├── zheng-pay-admin -- 后台管理[端口:3331]
| └── zheng-pay-web -- 演示示例[端口:3332]
2016-12-01 11:45:53 +08:00
├── zheng-ucenter -- 用户系统
2016-12-24 23:19:16 +08:00
| ├── zheng-ucenter-dao -- 数据库操作MyBatisGenerator生成
2016-12-01 14:43:49 +08:00
| ├── zheng-ucenter-service -- 业务逻辑
2016-12-09 16:45:18 +08:00
| └── zheng-ucenter-home -- 网站前台[端口:4441]
2016-12-01 15:01:08 +08:00
|── zheng-wechat-mp -- 微信公众号管理系统
2016-12-24 23:19:16 +08:00
| ├── zheng-wechat-mp-dao -- 数据库操作MyBatisGenerator生成
2016-12-01 15:01:08 +08:00
| ├── zheng-wechat-mp-service -- 业务逻辑
2016-12-09 16:45:18 +08:00
| └── zheng-wechat-mp-admin -- 后台管理[端口:5551]
2016-12-01 11:45:53 +08:00
├── zheng-api -- 接口系统
2016-12-01 16:18:46 +08:00
| ├── zheng-api-sdk -- 开发工具包
2016-12-28 21:47:53 +08:00
| ├── zheng-api-doc -- 接口文档项目
2016-12-09 16:45:18 +08:00
| └── zheng-api-example -- 演示示例[端口:6661]
2016-12-01 11:45:53 +08:00
└── zheng-oss -- 对象存储系统
2016-12-01 14:43:49 +08:00
├── zheng-oss-sdk -- 开发工具包
2016-12-09 16:45:18 +08:00
└── zheng-oss-web -- 管理界面[端口:7771]
2016-12-01 11:35:49 +08:00
```
2016-11-12 00:40:57 +08:00
2017-01-07 22:53:03 +08:00
# 项目模块结构图
![项目模块结构图](project-bootstrap/project.png)
2017-01-02 20:27:11 +08:00
2016-10-22 21:12:19 +08:00
# 后端技术:
2016-12-01 16:55:06 +08:00
* Spring Framework
2016-10-22 21:19:37 +08:00
* SpringMVC: MVC框架
2017-01-06 14:52:20 +08:00
* Spring secutity|Shiro: 安全框架
* Spring session: 分布式Session管理
2016-10-22 21:12:19 +08:00
* MyBatis: ORM框架
* MyBatis Generator: 代码生成
* Druid: 数据库连接池
2016-12-29 09:38:37 +08:00
* Jsp|Velocity|Thymeleaf: 模板引擎
2016-10-22 21:12:19 +08:00
* ZooKeeper: 协调服务
2017-01-06 14:36:37 +08:00
* Dubbo: 分布式服务框架
* TBSchedule|elastic-job: 分布式调度框架
2016-11-29 17:07:00 +08:00
* Redis: 分布式缓存数据库
2017-01-06 14:36:37 +08:00
* Quartz: 作业调度框架
* Ehcache: 缓存框架
2016-10-22 21:12:19 +08:00
* ActiveMQ: 消息队列
2017-01-06 14:36:37 +08:00
* Solr|Elasticsearch: 分布式全文搜索引擎
* FastDFS: 分布式文件系统
2016-10-22 21:12:19 +08:00
* Log4J: 日志管理
2016-11-17 13:49:44 +08:00
* Swagger2: 接口文档
2016-12-24 23:19:16 +08:00
* sequence: 分布式高效ID生产 [http://git.oschina.net/yu120/sequence](http://git.oschina.net/yu120/sequence "sequence")
2017-01-06 14:36:37 +08:00
* AliOSS|Qiniu: 云存储
* Protobuf|json: 数据传输
* Jenkins: 持续集成工具
* Maven|Gradle: 项目构建管理
2016-10-22 21:19:37 +08:00
2016-10-22 21:12:19 +08:00
# 前端技术:
2016-10-22 21:19:37 +08:00
* jQuery
* Bootstrap
* jQuery EasyUI
* AngularJs
2016-12-18 00:54:24 +08:00
* zhengAdmin [基于bootstrap实现的响应式Material Design风格的通用后台管理系统](https://github.com/shuzheng/zhengAdmin "zhengAdmin")
2016-12-18 01:01:34 +08:00
* autoMail [邮箱地址自动补全插件](https://github.com/shuzheng/autoMail "autoMail")
* zheng.jprogress.js [一款模仿youtube加载进度条插件](https://github.com/shuzheng/zheng.jprogress.js "zheng.jprogress.js")
* zheng.jtotop.js [返回顶部插件(可以任意速度滑动到指定任意位置)](https://github.com/shuzheng/zheng.jtotop.js "zheng.jtotop.js")
2016-10-22 21:19:37 +08:00
2017-01-10 12:37:00 +08:00
# 开发工具:
2016-10-22 21:12:19 +08:00
* MySql: 数据库
* jetty: 开发服务器
* Tomcat: 应用服务器
2016-11-29 22:46:36 +08:00
* SVN|Git: 版本管理
2016-10-22 21:12:19 +08:00
* Nginx: 反向代理服务器
2017-01-06 14:36:37 +08:00
* Varnish: HTTP加速器
2016-10-22 21:12:19 +08:00
* IntelliJ IDEA: 开发IDE
* PowerDesigner: 建模工具
2017-01-06 14:36:37 +08:00
* Navicat for MySQL: 数据库客户端
2016-11-14 13:15:54 +08:00
2017-01-10 12:37:00 +08:00
# 项目使用方法
2016-12-09 16:45:18 +08:00
2017-01-10 12:37:00 +08:00
### 开发环境搭建:
2017-01-10 13:27:57 +08:00
* 前提本机安装Jdk7、Mysql、Redis、Zookeeper、ActiveMQ并启动相关服务使用默认配置默认端口下面有资源下载链接安装流程略
* 克隆源代码到本地并打开推荐使用IntelliJ IDEA本地编译并安装到本地maven仓
2017-01-10 12:37:00 +08:00
### 开发流程
2017-01-10 13:27:57 +08:00
- 创建数据表建议使用PowerDesigner
2017-01-10 12:37:00 +08:00
2017-01-10 13:31:31 +08:00
- 配置对应dao模块的generatorConfig.xml只需底部追加指定表的代码生成可生成单表的CRUD功能
2017-01-10 13:27:57 +08:00
- 生成的model和example均已实现Serializable接口支持分布式
- 生成的mapper.xml的selectByExample方法自动包含分页参数offset和limit
- 已包含抽象类BaseServiceImpl只需要继承抽象类并传入泛型参数即可默认实现mapper接口所有方法特殊需求直接扩展即可
2017-01-10 13:31:31 +08:00
2017-01-10 13:27:57 +08:00
- 启动流程优先rcp-service服务提供者再启动其他webapp
2017-01-10 12:37:00 +08:00
### 资源下载链接
2017-01-10 13:45:16 +08:00
* JDK7 [http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u80-oth-JPR](http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u80-oth-JPR "JDK7")
2016-11-27 00:05:52 +08:00
* Maven [http://maven.apache.org/download.cgi](http://maven.apache.org/download.cgi "Maven")
* Redis [https://redis.io/download](https://redis.io/download "Redis")
* ActiveMQ [http://activemq.apache.org/download-archives.html](http://activemq.apache.org/download-archives.html "ActiveMQ")
* ZooKeeper [http://www.apache.org/dyn/closer.cgi/zookeeper/](http://www.apache.org/dyn/closer.cgi/zookeeper/ "ZooKeeper")
2016-12-19 17:59:26 +08:00
* Dubbo [http://dubbo.io/Download-zh.htm](http://dubbo.io/Download-zh.htm "Dubbo")
2016-11-27 00:05:52 +08:00
* Jenkins [http://updates.jenkins-ci.org/download/war/](http://updates.jenkins-ci.org/download/war/ "Jenkins")
2017-01-10 13:45:16 +08:00
* dubbo-admin-2.5.3 [http://download.csdn.net/detail/shuzheng5201314/9733652](http://download.csdn.net/detail/shuzheng5201314/9733652 "dubbo-admin-2.5.3")
* dubbo-admin-2.5.4-SNAPSHOT-jdk8 [http://download.csdn.net/detail/shuzheng5201314/9733657](http://download.csdn.net/detail/shuzheng5201314/9733657 "dubbo-admin-2.5.4-SNAPSHOT-jdk8")
2016-11-14 13:15:54 +08:00
2017-01-09 17:55:10 +08:00
### 修改本地Host
* 127.0.0.1 upms.zhangshuzheng.cn
* 127.0.0.1 cms.zhangshuzheng.cn
* 127.0.0.1 pay.zhangshuzheng.cn
* 127.0.0.1 ucenter.zhangshuzheng.cn
* 127.0.0.1 wechat.zhangshuzheng.cn
* 127.0.0.1 api.zhangshuzheng.cn
* 127.0.0.1 oss.zhangshuzheng.cn
2017-01-02 21:12:49 +08:00
# 预览图
![预览效果图](https://github.com/shuzheng/zhengAdmin/raw/master/src/images/zheng-upms-crud.png)
2016-11-14 13:15:54 +08:00
# 数据模型
2016-12-09 09:33:06 +08:00
![数据库模型](project-datamodel/zheng.png)
2016-12-16 10:43:09 +08:00
2017-01-02 20:27:11 +08:00
# 拓扑图
![拓扑图](project-bootstrap/distributedSystem.png)