Skip to content

Commit dbb0900

Browse files
committed
添加了Ruoyi项目作为单机项目引入进行绞杀模型的迭代尝试
1 parent 64e13d4 commit dbb0900

File tree

440 files changed

+89524
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+89524
-19
lines changed

README.md

+25-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,22 @@ PConnect是基于AngularX+SpringCloud的企业级基础功能框架(户权限管
1010

1111

1212
# 架构设计
13+
14+
### 架构原理图
15+
1316
![img](http://on-img.com/chart_image/5954b886e4b0ad619ac73246.png)
1417

18+
### 对单机项目的整合
19+
20+
当我在想用一个什么项目作为老项目的时候,找我的收藏夹,发现了一个不错的开源项目(若依RuoYi),在这里他表示感谢!
21+
所以我打算找多个“老项目”进行整合,也作为一个示范,RuoYi是第一个
22+
23+
对“老项目”的整合采用“绞窄模式(Strangulation Patterns)”(见[Martin Fowler的博客](https://martinfowler.com/bliki/StranglerApplication.html))进行,放在strangulation目录下。这些“老项目”自身的说明,请见对应项目目录。
24+
25+
##### 整合一:
26+
* RuoYi
27+
28+
1529
## 前端技术:Angular;
1630
支持angular2、4、5版本,UI使用[AdminLTE](https://github.com/almasaeed2010/AdminLTE)
1731
- angular-cli
@@ -73,16 +87,20 @@ ng serve
7387
```
7488

7589
#### 后台开发运行
90+
7691
1. 启动一个redis服务
77-
2. 后台启动前先在连接的mysql数据库中建立pconnect、pconnect_auth两个空数据库
78-
3. 在pconnect-user,pconnect-dbcreate的项目中配置好mysql的数据库连接
92+
2. 首次运行,后台启动前先在连接的mysql数据库中建立pconnect_dev、pconnect_auth_dev、ry_dev三个空数据库
93+
3. 在pconnect-user,pconnect-dbcreate、ruoyi的项目中配置好mysql的数据库连接(目前ry_dev首次生成要在ruoyi项目中使用mvn compile flyway:migrate命令,后期追加sql变更则可以直接运行项目自动变更)
7994
4. 然后依次启动:
8095

8196
- CenterBootstrap
8297
- GateBootstrap
8398
- UserBootstrap
8499
- DBCreateBootstrap
85100
- TodoBootstrap
101+
- RuoYiApplication
102+
103+
5. 每次开发的时候也不是需要启动所有子项目,只需要启动必须启动的CenterBootstrap、GateBootstrap、UserBootstrap,再加上需要编码调试的对应项目。
86104

87105
#### 访问
88106
```
@@ -113,7 +131,11 @@ java -jar {jar包名称}
113131
./deploy-to-docker.sh
114132
```
115133

116-
### 框架整合计划:
134+
### All in One脚本
135+
136+
待续
137+
138+
## 框架整合计划:
117139

118140
| 技术条目 | 待整合 | 已整合 |
119141
| --- | --- | --- |
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
11
package cn.bgenius.analysis.spc.controller;
22

3+
import cn.bgenius.analysis.spc.entity.TTest;
4+
import cn.bgenius.analysis.spc.service.TestService;
5+
import cn.bgenius.pconnect.common.controller.BaseController;
6+
import cn.bgenius.pconnect.common.util.JsonUtil;
7+
import com.alibaba.fastjson.JSONObject;
38
import io.swagger.annotations.ApiOperation;
49
import org.springframework.web.bind.annotation.RequestMapping;
510
import org.springframework.web.bind.annotation.RequestMethod;
611
import org.springframework.web.bind.annotation.RestController;
712

13+
import java.util.List;
14+
15+
/**
16+
* @program: bgenius-pconnect
17+
* @description: 这时一个基本连通测试
18+
* @author: 金飞
19+
* @create: 2018-09-17 16:00
20+
**/
821
@RestController
922
@RequestMapping("v1/test")
10-
public class TestController {
23+
public class TestController extends BaseController<TestService, TTest,Integer> {
1124

12-
@ApiOperation("这时一个基本连通测试")
25+
@ApiOperation("这是一个基本连通测试")
1326
@RequestMapping(value = "", method = RequestMethod.GET)
1427
public String test() throws Exception{
1528
return "analysis-spc-test";
1629
}
1730

18-
@ApiOperation("这时一个基本连通测试/")
31+
@ApiOperation("这是一个基本连通测试/")
1932
@RequestMapping(value = "/", method = RequestMethod.GET)
2033
public String test1() throws Exception{
2134
return "analysis-spc-test/";
2235
}
36+
37+
@ApiOperation(value = "注意不要一次获取全部列表" )
38+
@RequestMapping(value = "getList/{key}", method = RequestMethod.GET)
39+
public JSONObject getTestList() throws Exception {
40+
List<TTest> todoes = baseServiceImpl.selectListAll();
41+
return JsonUtil.getSuccessJsonObject(todoes);
42+
}
2343
}

pconnect-springcloud/bizsrvs/analysis-spc/src/main/java/cn/bgenius/analysis/spc/entity/TGlossary.java pconnect-springcloud/bizsrvs/analysis-spc/src/main/java/cn/bgenius/analysis/spc/entity/TTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import javax.persistence.*;
44

55
@Table(name = "test")
6-
public class TGlossary {
6+
public class TTest {
77
@Id
88
private Integer id;
99

pconnect-springcloud/bizsrvs/analysis-spc/src/main/java/cn/bgenius/analysis/spc/mapper/TGlossaryMapper.java

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package cn.bgenius.analysis.spc.mapper;
2+
3+
import cn.bgenius.analysis.spc.entity.TTest;
4+
import tk.mybatis.mapper.common.Mapper;
5+
6+
public interface TTestMapper extends Mapper<TTest> {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package cn.bgenius.analysis.spc.service;
2+
3+
import cn.bgenius.analysis.spc.entity.TTest;
4+
import cn.bgenius.pconnect.common.service.BaseService;
5+
6+
public interface TestService extends BaseService<TTest> {
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package cn.bgenius.analysis.spc.service.impl;
2+
3+
import cn.bgenius.analysis.spc.entity.TTest;
4+
import cn.bgenius.analysis.spc.mapper.TTestMapper;
5+
import cn.bgenius.analysis.spc.service.TestService;
6+
import cn.bgenius.pconnect.common.service.impl.BaseServiceImpl;
7+
import org.springframework.stereotype.Service;
8+
9+
@Service
10+
public class TestServiceImpl extends BaseServiceImpl<TTestMapper, TTest> implements TestService {
11+
}

pconnect-springcloud/bizsrvs/analysis-spc/src/main/resources/builder/generatorConfig.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
<javaClientGenerator targetPackage="${targetMapperPackage}"
3333
targetProject="${targetJavaProject}" type="XMLMAPPER" />
3434

35-
<table tableName="test" domainObjectName="TGlossary"/>
35+
<table tableName="test" domainObjectName="TTest"/>
36+
<table tableName="group_sub_computed" domainObjectName="TGroupSubComputed"/>
3637

3738
</context>
3839
</generatorConfiguration>

pconnect-springcloud/bizsrvs/analysis-spc/src/main/resources/mapper/TGlossaryMapper.xml pconnect-springcloud/bizsrvs/analysis-spc/src/main/resources/mapper/TTestMapper.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3-
<mapper namespace="cn.bgenius.analysis.spc.mapper.TGlossaryMapper" >
4-
<resultMap id="BaseResultMap" type="cn.bgenius.analysis.spc.entity.TGlossary" >
3+
<mapper namespace="cn.bgenius.analysis.spc.mapper.TTestMapper" >
4+
<resultMap id="BaseResultMap" type="cn.bgenius.analysis.spc.entity.TTest" >
55
<!--
66
WARNING - @mbggenerated
77
-->

pconnect-springcloud/pom.xml

+9
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<module>/bizsrvs/pconnect-todo</module>
4040
<module>/bizsrvs/pconnect-knw</module>
4141
<module>/bizsrvs/analysis-spc</module>
42+
<module>/strangulation/ruoyi</module>
4243
</modules>
4344

4445
<developers>
@@ -57,6 +58,14 @@
5758
<type>pom</type>
5859
<scope>import</scope>
5960
</dependency>
61+
<!-- https://mvnrepository.com/artifact/org.springframework.session/spring-session -->
62+
<dependency>
63+
<groupId>org.springframework.session</groupId>
64+
<artifactId>spring-session</artifactId>
65+
<version>1.3.3.RELEASE</version>
66+
</dependency>
67+
68+
6069
<!--热启动插件
6170
<dependency>
6271
<groupId>org.springframework.boot</groupId>

pconnect-springcloud/pubsrvs/pconnect-gate/src/main/java/cn/bgenius/pconnect/gate/GateBootstrap.java

+13
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
88
import org.springframework.cloud.netflix.feign.EnableFeignClients;
99
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
10+
import org.springframework.cloud.netflix.zuul.filters.discovery.PatternServiceRouteMapper;
11+
import org.springframework.context.annotation.Bean;
1012
import org.springframework.session.data.redis.RedisFlushMode;
1113
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
1214

@@ -24,4 +26,15 @@ public static void main(String[] args) {
2426
SpringApplication.run(GateBootstrap.class, args);
2527
}
2628

29+
// /**
30+
// * It uses regular expression named groups to extract variables from serviceId and inject them into a route pattern.
31+
// * @return
32+
// */
33+
// @Bean
34+
// public PatternServiceRouteMapper serviceRouteMapper() {
35+
// return new PatternServiceRouteMapper(
36+
// "(?<name>^.+)-(?<version>v.+$)",
37+
// "${version}/${name}");
38+
// }
39+
2740
}

pconnect-springcloud/pubsrvs/pconnect-gate/src/main/resources/application-dev.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ spring:
1616
server:
1717
port: 8965
1818

19+
# path: /pconnect-user/*只能匹配一个级别,path: /pconnect-user/**可以匹配后面任意个/
1920
zuul:
21+
# 使用application.yml文件配置zuul的routes,那么这里的路由列表按照书写顺序存在优先级,如果使用的是properties文件配置,则失去优先级这个特性,所以,如果要使用优先级,必须使用yaml文件配置
2022
routes:
2123
pconnect-user:
2224
path: /pconnect-user/**
@@ -30,18 +32,33 @@ zuul:
3032
analysis-spc:
3133
path: /analysis-spc/**
3234
serviceId: analysis-spc
35+
legacy:
36+
path: http://localhost:8041
3337
sensitive-headers:
3438
host:
3539
connect-timeout-millis: 60000
3640
socket-timeout-millis: 60000
41+
# ignored-services: '*'
42+
# prefix: /api
43+
# stripPrefix: true //这个stripPrefix的作用,实际测试好像和文档中说的不一样
3744

3845
# 负载均衡
3946
ribbon:
4047
eureka:
4148
enabled: true
4249
ReadTimeout: 60000
43-
ConnectTimeout: 60000
50+
ConnectTimeout: 3000
4451

52+
#ribbon:
53+
# eureka:
54+
# enabled: false
55+
#
56+
#pconnect-user:
57+
# ribbon:
58+
# listOfServers: http://localhost:8964,http://localhost:7964
59+
60+
61+
# prefer-ip-address: true
4562
eureka:
4663
instance:
4764
statusPageUrlPath: ${management.context-path}/info
@@ -98,4 +115,6 @@ github:
98115
resource:
99116
userInfoUri: https://api.github.com/user
100117

101-
118+
logging:
119+
level:
120+
com.netflix: debug

pconnect-springcloud/pubsrvs/pconnect-user/src/main/resources/application-dev.yml

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ eureka:
6161
client:
6262
serviceUrl:
6363
defaultZone: http://localhost:8961/eureka/
64+
instance:
65+
prefer-ip-address: true
6466

6567
management:
6668
security:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 RuoYi
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
## 平台简介
2+
3+
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
4+
5+
性别男,若依是女儿的名字。
6+
7+
若依基于hplus和inspinia两套后台系统模板开发。有需要可自行到群内下载。
8+
9+
http://www.zi-han.net/theme/hplus
10+
11+
http://webapplayers.com/inspinia_admin-v2.7.1
12+
13+
阿里云优惠活动(2CPU 4GRAM 1M带宽 40G高效云盘):https://promotion.aliyun.com/ntms/act/vm/aliyun-group/buy.html?group=BphATfDhsQ
14+
15+
云产品通用1000元代金券,可叠加官网常规优惠使用 :https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof
16+
17+
## 内置功能
18+
19+
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
20+
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
21+
3. 岗位管理:配置系统用户所属担任职务。
22+
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
23+
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
24+
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
25+
7. 参数管理:对系统动态配置常用参数。
26+
8. 通知公告:系统通知公告信息发布维护。
27+
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
28+
10. 登录日志:系统登录日志记录查询包含登录异常。
29+
11. 在线用户:当前系统中活跃用户状态监控。
30+
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
31+
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
32+
14. 系统接口:根据业务代码自动生成相关的api接口文档。
33+
15. 在线构建器:拖动表单元素生成相应的HTML代码。
34+
16. 连接池监视:监视当期系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
35+
## 在线体验
36+
> admin/admin123
37+
38+
地址:http://www.ruoyi.club
39+
40+
## 演示图
41+
42+
<table>
43+
<tr>
44+
<td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
45+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132411_4c5I_1438828.png"/></td>
46+
</tr>
47+
<tr>
48+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132436_rRBh_1438828.png"/></td>
49+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132442_umjM_1438828.png"/></td>
50+
</tr>
51+
<tr>
52+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132449_OtY8_1438828.png"/></td>
53+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132454_4Evz_1438828.png"/></td>
54+
</tr>
55+
<tr>
56+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132520_Zzkj_1438828.png"/></td>
57+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132539_5bJe_1438828.png"/></td>
58+
</tr>
59+
<tr>
60+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132548_ne4U_1438828.png"/></td>
61+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132557_Fab4_1438828.png"/></td>
62+
</tr>
63+
<tr>
64+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132617_MLmV_1438828.png"/></td>
65+
<td><img src="https://static.oschina.net/uploads/space/2018/0902/132626_3iBs_1438828.png"/></td>
66+
</tr>
67+
</table>
68+
69+
70+
## 若依交流群
71+
72+
QQ群: [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/QQ群-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) 点击按钮入群。

0 commit comments

Comments
 (0)