|
| 1 | +<p align=center> |
| 2 | + <a href="https://github.com/Jasonandy/springboot-wx.git"> |
| 3 | + <img src="http://upload-images.jianshu.io/upload_images/7802425-9eb1bcd006e34aa6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="wx-apps" > |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <a href="#"><img src="https://img.shields.io/badge/Bulid-Pass-blue.svg?style=for-the-badge" alt="wx-apps"></a> |
| 9 | + <a href="#"><img src="https://img.shields.io/badge/Author-Jason-orange.svg?style=for-the-badge" alt="wx-apps"></a> |
| 10 | +</p> |
| 11 | + |
| 12 | + |
| 13 | +# Ucaner |
| 14 | +> You are what you want to be. - w.b |
| 15 | +
|
| 16 | +## 1.wx-apps 大概需要的实现的功能模块 |
| 17 | + |
| 18 | +微信小程序Java和后台 |
| 19 | + |
| 20 | +> 1.整合小程序 |
| 21 | +> |
| 22 | +> 2.接口服务 |
| 23 | +> |
| 24 | +> 3.对外提供api网关服务 |
| 25 | +
|
| 26 | +## 2.代码模块的具体划分 |
| 27 | + |
| 28 | +> 1.wx-apps-core |
| 29 | +
|
| 30 | +一些基本的Core信息,登录校验,全局的常量,枚举类,base基类的抽取,通用的工具类的抽取,全局的响应状态码的定义,监听器容器初始化数据的加载配置和初始化 |
| 31 | +拦截器登录信息的校验,系统性能的日志统计[日志后期选型为logback] |
| 32 | + |
| 33 | +> 2.wx-apps-service |
| 34 | +
|
| 35 | +业务模块的抽取,分为基本用户的CURD操作,线下营销人员的业务等,代码里面做细分 |
| 36 | + |
| 37 | +> 3.wx-apps-gateway |
| 38 | +
|
| 39 | +对内和对外的网关服务,对内提供小程序的 api接口,对外提供通信接口 |
| 40 | +[后期加入 短信推送 小程序站内消息推送 公司配置化的邮箱推送提醒等接口] |
| 41 | + |
| 42 | +异步和同步回调通知等相关api[后期优化] |
| 43 | + |
| 44 | +> 4.wx-apps-web-boss |
| 45 | +
|
| 46 | +商户管理后台,加入Shiro控制权限细粒度,配置多个商户,进行增删改查等操作[可能考虑不做前后分离] |
| 47 | +做的话优先Vue-Admin等开源的后台管理模块整合 |
| 48 | + |
| 49 | +## 3.Jenkins 环境集成 SonarQube 质量检测 |
| 50 | + |
| 51 | +> 1.CentOS7 |
| 52 | +
|
| 53 | +> 2.Jenkins SonarQube 搭建 |
| 54 | +
|
| 55 | + |
| 56 | +## 4.Eolinker Swagger api相关迭代开发 |
| 57 | + |
| 58 | +> 1.Eolinker 搭建 |
| 59 | +
|
| 60 | + |
| 61 | +## 5.测试Bug提测进度管理 |
| 62 | + |
| 63 | +> 1.project排期 |
| 64 | +
|
| 65 | +> 2.禅道 |
| 66 | +
|
| 67 | + |
| 68 | +## 6.SpirngBoot maven 编译打包 |
| 69 | + |
| 70 | +> 1.插件实现编译打包 |
| 71 | +
|
| 72 | +```xml |
| 73 | +<!-- BUILD PROJECT --> |
| 74 | + <build> |
| 75 | + <!-- PACKAGE SOURCE LOCATION --> |
| 76 | + <resources> |
| 77 | + <resource> |
| 78 | + <directory>src/main/resources</directory> |
| 79 | + </resource> |
| 80 | + <resource> |
| 81 | + <directory>src/main/java</directory> |
| 82 | + <includes> |
| 83 | + <include>**/*.properties</include> |
| 84 | + <include>**/*.xml</include> |
| 85 | + </includes> |
| 86 | + <filtering>false</filtering> |
| 87 | + </resource> |
| 88 | + </resources> |
| 89 | + |
| 90 | + <!-- SpringBoot 打包插件 web[war]应用打包为exec.jar 加入application主线程的jar包 --> |
| 91 | + <!-- Linux 启动 nohup java -jar xxx.exec.jar & --> |
| 92 | + <!-- 后期计划结合Jenkins SonarQube 实现持续化集成环境 + 代码质量检测 by WanGuo --> |
| 93 | + <plugins> |
| 94 | + |
| 95 | + <plugin> |
| 96 | + <groupId>org.springframework.boot</groupId> |
| 97 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 98 | + <configuration> |
| 99 | + <executable>true</executable> |
| 100 | + </configuration> |
| 101 | + <executions> |
| 102 | + <execution> |
| 103 | + <goals> |
| 104 | + <goal>repackage</goal> |
| 105 | + </goals> |
| 106 | + <configuration> |
| 107 | + <classifier>exec</classifier> |
| 108 | + </configuration> |
| 109 | + </execution> |
| 110 | + </executions> |
| 111 | + </plugin> |
| 112 | + |
| 113 | + <!-- docker-maven-plugin --> |
| 114 | + <plugin> |
| 115 | + <groupId>com.spotify</groupId> |
| 116 | + <artifactId>docker-maven-plugin</artifactId> |
| 117 | + <version>0.4.13</version> |
| 118 | + <configuration> |
| 119 | + <imageName>${docker.image.prefix}/${project.artifactId}</imageName> |
| 120 | + <dockerDirectory>src/main/docker</dockerDirectory> |
| 121 | + <resources> |
| 122 | + <resource> |
| 123 | + <targetPath>/</targetPath> |
| 124 | + <directory>${project.build.directory}</directory> |
| 125 | + <include>${project.build.finalName}.jar</include> |
| 126 | + </resource> |
| 127 | + </resources> |
| 128 | + </configuration> |
| 129 | + </plugin> |
| 130 | + </plugins> |
| 131 | + </build> |
| 132 | + |
| 133 | +``` |
| 134 | + |
| 135 | +```properties |
| 136 | +mvn clean |
| 137 | + |
| 138 | +mvn install |
| 139 | + |
| 140 | +//部署用内置 嵌入式tomcat or 外置tomcat容器 后期根据业务优化 |
| 141 | + |
| 142 | +// 后期可以考虑 docker 部署 |
| 143 | +``` |
| 144 | + |
| 145 | + |
| 146 | +### 6.1方案一 基于Jenkins持续化集成方案 |
| 147 | + |
| 148 | +> 1.Jenkins |
| 149 | +
|
| 150 | +搭建Jenkins 添加git相关插件 结合maven插件打包 用shell脚本实现 部署启停 |
| 151 | + |
| 152 | +```jshelllanguage |
| 153 | +sh nohup java -jar xxx.exec.jar & //启动 |
| 154 | +
|
| 155 | +ps -ef | grep java sed awk kill -9 ${} //停止 |
| 156 | +``` |
| 157 | + |
| 158 | +> 2. |
| 159 | +
|
| 160 | +### 6.2方案二 直接gitee 拉取打包部署 |
| 161 | +```jshelllanguage |
| 162 | +
|
| 163 | +git clone https://gitee.com/isd_info/Demo_wubin |
| 164 | +
|
| 165 | +cd /**/ |
| 166 | +
|
| 167 | +mvn clean |
| 168 | +mvn install |
| 169 | +... |
| 170 | +``` |
| 171 | + |
| 172 | + |
| 173 | +## 7.运维部署 |
| 174 | + |
| 175 | +> 1.Jdk 配置(1.8+) |
| 176 | +```jshelllanguage |
| 177 | +//不推荐 openJdk |
| 178 | +
|
| 179 | +//安装oracle JDK8+ |
| 180 | +wget ... |
| 181 | +tar -vxf jdk1.8.14X.tar.gz |
| 182 | +
|
| 183 | +//配置环境变量 |
| 184 | +vim /etc/profile |
| 185 | +
|
| 186 | +$JAVA_HOME=... |
| 187 | +$JAVA_CLASSPATH=... |
| 188 | +
|
| 189 | +``` |
| 190 | + |
| 191 | +> 2.Nginx |
| 192 | +```jshelllanguage |
| 193 | +//编译源码安装 (推荐) |
| 194 | +
|
| 195 | +
|
| 196 | +// rpm 编译包安装 |
| 197 | +
|
| 198 | +//yum |
| 199 | +yum install nginx |
| 200 | +
|
| 201 | +``` |
| 202 | + |
| 203 | +```properties |
| 204 | +//配置nginx |
| 205 | +vim nginx.confg |
| 206 | + |
| 207 | +//配置ssl 证书 为网页加https |
| 208 | + |
| 209 | +//openssl 生成证书 SpringBoot需要做处理 已经实现 |
| 210 | +``` |
| 211 | + |
| 212 | + |
| 213 | +> 3.Mysql |
| 214 | +```properties |
| 215 | +//yum 不推荐 已经不开源了mysql |
| 216 | + |
| 217 | +//推荐安装5.6左右的开源版本 |
| 218 | + |
| 219 | +// 字符集utf-8 有坑 推荐utf-8umf |
| 220 | + |
| 221 | +//数据库引擎采用innodb 支持事物和锁 |
| 222 | +``` |
| 223 | + |
| 224 | +> 4.Redis 等中间件 - 后期 |
| 225 | +```properties |
| 226 | +//后期提示性能引入缓存 |
| 227 | + |
| 228 | + |
| 229 | +``` |
| 230 | + |
| 231 | +## 8.Task |
| 232 | ++ 测试 |
| 233 | + - 测试环境 |
| 234 | ++ 部署 |
| 235 | + - 部署环境 |
| 236 | + |
| 237 | +## 9.技术清单 |
| 238 | ++ Spring //提升到5 |
| 239 | ++ SpringBoot //后期对版本做提升 |
| 240 | ++ SpringMVC |
| 241 | ++ Mybatis //后期优化 MybatisPlus + 插件 |
| 242 | ++ Shiro //实现权限控制管理 |
| 243 | ++ Ehcahe //优化性能 + Shiro 登录管理 |
| 244 | + |
| 245 | ++ 后期可能会考虑到的 |
| 246 | ++ ElasticSearch //提供搜索 or 日志分析 |
| 247 | ++ Kafaka // 消息队列 做后台的消息通知等 //回掉 |
| 248 | ++ Dubbo //服务拆分 先预留逻辑 |
| 249 | ++ Oauth2.0 Jwt 等 //鉴权相关 |
| 250 | + |
| 251 | ++ Vue 前后分离 or Node.js 做服务端 |
| 252 | + |
| 253 | + |
| 254 | +## Contact |
| 255 | +- Company : JasonInternational co.,LTD |
| 256 | +- Website : https://wx.apps.ucaner.cn |
0 commit comments