Bladex

来自ling
跳转至: 导航搜索

常用

http://192.168.74.129:7002/ blade-ops/blade-admin/src/main/resources/bootstrap.yml blade/blade

http://192.168.74.129:3000/login script/docker/app/prometheus/config/grafana.ini admin/admin

http://192.168.74.129:9090/

http://192.168.74.129:18000/doc.html#/home

http://192.168.74.129:8858/#/login sentinel/sentinel

http://192.168.74.129:84/ admin/admin

https://git.bladex.vip/blade

大屏前端:https://git.avuejs.com/avue/avue-data 大屏文档:https://git.avuejs.com/avue/avue-kanyun

支付插件 https://codeup.aliyun.com/yungouos/java/Blade-Pay.git 账户:Bladex-Pay 密码:Bladex-Pay888

介绍

Docker常用服务#postgresql Linux JDK安装及配置 (tar.gz版) Maven

LauncherServiceImpl LauncherConstant


https://bladex.vip/#/doc/prepare

o	BladeX
o	基于 SpringCloud Greenwich 深度定制的微服务快速开发框架
o	BladeX-Tool
o	SpringCloud 深度定制的微服务核心封装包
o	BladeX-Boot
o	BladeX 的 SpringBoot 版本,助航中小型系统极速开发
o	BladeX-Biz
o	为BladeX分布式系统专门设计的业务工程专用框架
o	BladeX-Biz-Archetype
o	为BladeX-Biz业务工程设计的项目骨架
o	Archer
o	为BladeX专门设计的独立代码生成系统后端
o	ArcherUI
o	为BladeX专门设计的独立代码生成系统前端
o	Flowable-Design
o	单独抽离的flowable流程设计器,已全面汉化
o	Sword
o	基于 React、Ant Design、Dva、Umi 开发的BladeX前端项目
o	Saber
o	基于 Vue、Vuex、Element-UI、Avue 开发的BladeX前端项目
o	Avue核心已经开源,开源协议为MIT,所以Saber可以直接商用
o	若需要Avue的增强框架推荐购买授权:https://avuejs.com/vip


BladeX
├── blade-auth -- 授权服务提供
├── blade-common -- 常用工具封装包
├── blade-gateway -- Spring Cloud 网关
├── blade-ops -- 运维中心
├ ├── blade-admin -- 服务监控
├ ├── blade-develop -- 代码生成
├ ├── blade-flow -- 工作流
├ ├── blade-flow-design -- 工作流设计器
├ ├── blade-log -- 日志模块
├ ├── blade-resource -- 资源模块
├ ├── blade-turbine -- 监控控制台
├ ├── blade-xxljob -- 分布式任务调度
├ ├── blade-xxljob-admin -- 分布式任务调度后端
├ └── blade-zipkin -- 分布式链路追踪
├── blade-service -- 业务模块
├ ├── blade-desk -- 工作台模块
├ ├── blade-system -- 系统模块
├ └── blade-user -- 用户模块
├── blade-service-api -- 业务模块api封装
├ ├── blade-desk-api -- 工作台api
├ ├── blade-dict-api -- 字典api
├ ├── blade-scope-api -- 数据权限api
├ ├── blade-system-api -- 系统api
└── └── blade-user-api -- 用户api

nacos

nacos-docker镜像安装nacos并配置数据库 https://nacos.io/zh-cn/docs/deployment.html

更多参考https://github.com/nacos-group https://github.com/nacos-group/nacos-docker  https://github.com/nacos-group/nacos-k8s

Docker常用服务#nacos

mkdir -p /alidata/server/nacos
cd 
wget https://github.com/alibaba/nacos/releases/download/1.3.1/nacos-server-1.3.1.tar.gz
tar -xvf nacos-server-1.3.1.tar.gz

单机模式支持mysql

在0.7版本之前,在单机模式时nacos使用嵌入式数据库实现数据的存储,不方便观察数据存储的基本情况。0.7版本增加了支持mysql数据源能力,具体的操作步骤:

  • 安装数据库,版本要求:5.6.5+
  • 初始化mysql数据库,数据库初始化文件:nacos-mysql.sql
  • 修改conf/application.properties文件,增加支持mysql数据源配置(目前只支持mysql),添加mysql数据源的url、用户名和密码。
spring.datasource.platform=mysql
db.num=1
db.url.0=jdbc:mysql://11.162.196.16:3306/nacos_devtest?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
db.user=nacos_devtest
db.password=youdontknow

再以单机模式启动nacos,nacos所有写嵌入式数据库的数据都写到了mysql

Sentinel

https://github.com/alibaba/Sentinel/wiki

Docker常用服务#sentinel

演示

Ling-cloud#docker_stack_2

docker

mvn clean package dockerfile:build dockerfile:push
  1. 配置好脚本集后,将下图文件拷贝至部署文件夹 ( 注意要把.env 文件也一起拷贝,有时候ftp文件不会显示 )
  2. 进入该目录,给deploy.sh 赋予执行权限 chmod 744 deploy.sh
  3. 部署执行docker ps 查看目前启动的docker服务
  1. 执行cd /docker/script 进入目录后依次执行:
    1. 1. ./deploy.sh port 开启端口
    2. 2. ./deploy.sh mount 放置挂载文件
    3. 3. ./deploy.sh base 启动基础模块(这时需要打开nacos进行配置文件的配置)
    4. 4. ./deploy.sh modules 启动业务模块

打开聚合文档地址(http://宿主机ip:88/doc.html)查看接口调用,网关地址为之前配置好的nginx对网关的反向代理地址(http://宿主机ip:88)

发现调用都没有问题,基于docker的部署已经成功

端口

http://192.168.74.129:7002/ blade-ops/blade-admin/src/main/resources/bootstrap.yml blade/blade

http://192.168.74.129:3000/login script/docker/app/prometheus/config/grafana.ini admin/admin

http://192.168.74.129:9090/

http://192.168.74.129:18000/doc.html#/home

http://192.168.74.129:8858/#/login sentinel/sentinel

http://192.168.74.129:84/ admin/admin


0.0.0.0:9999->9999/tcp                                             script_blade-flow-design_1
 80/tcp, 0.0.0.0:8000->8000/tcp                                     script_web-nginx_1
8008/tcp                                                           script_blade-flow_1
 0.0.0.0:3000->3000/tcp                                             script_grafana_1
 0.0.0.0:9190->9100/tcp                                             script_node-exporter_1
0.0.0.0:9104->9104/tcp                                             script_mysqld-exporter_1
0.0.0.0:9090->9090/tcp                                             script_prometheus_1
0.0.0.0:18080->8080/tcp                                            script_cadvisor_1
 80/tcp                                                             script_blade-gateway2_1
8105/tcp                                                           script_blade-desk_1
8102/tcp                                                           script_blade-user_1
8100/tcp                                                           script_blade-auth1_1
80/tcp                                                             script_blade-gateway1_1
8100/tcp                                                           script_blade-auth2_1
 8103/tcp                                                           script_blade-log_1
 8106/tcp                                                           script_blade-system_1
 8010/tcp                                                           script_blade-resource_1
0.0.0.0:18000->18000/tcp                                           script_blade-swagger_1
 7003/tcp                                                           script_blade-report_1
  0.0.0.0:7002->7002/tcp                                             script_blade-admin_1
 0.0.0.0:7003->7003/tcp                                             script_blade-turbine_1
  0.0.0.0:8848->8848/tcp                                             script_nacos_1
 80/tcp, 0.0.0.0:88->88/tcp                                         script_blade-nginx_1
 0.0.0.0:8091->8091/tcp                                             script_seata-server_1
 8719/tcp, 0.0.0.0:8858->8858/tcp                                   script_sentinel_1
0.0.0.0:3379->6379/tcp                                             script_blade-redis_1

19cb1e133900   192.168.74.129:84/blade/blade-flow-design:2.8.0.RELEASE   "java -Djava.securit…"   41 seconds ago   Up 9 seconds              0.0.0.0:9999->9999/tcp                                             script_blade-flow-design_1
2897bbe9a63f   nginx:stable-alpine-perl                                  "/docker-entrypoint.…"   14 minutes ago   Up 14 minutes             80/tcp, 0.0.0.0:8000->8000/tcp                                     script_web-nginx_1
3dacf22cdb91   192.168.74.129:84/blade/blade-flow:2.8.0.RELEASE          "java -Djava.securit…"   24 minutes ago   Up 21 minutes             8008/tcp                                                           script_blade-flow_1
014f1cf88930   grafana/grafana:7.3.7                                     "/run.sh"                12 hours ago     Up 12 minutes             0.0.0.0:3000->3000/tcp                                             script_grafana_1
db6aa400fbe2   prom/node-exporter:v1.0.1                                 "/bin/node_exporter"     12 hours ago     Up 12 minutes             0.0.0.0:9190->9100/tcp                                             script_node-exporter_1
05bcfe47f71b   prom/mysqld-exporter:v0.12.1                              "/bin/mysqld_exporter"   12 hours ago     Up 12 minutes             0.0.0.0:9104->9104/tcp                                             script_mysqld-exporter_1
22c2ec2c7ea3   prom/prometheus:v2.24.1                                   "/bin/prometheus --c…"   12 hours ago     Up 12 minutes             0.0.0.0:9090->9090/tcp                                             script_prometheus_1
e1979c1acfae   google/cadvisor:v0.33.0                                   "/usr/bin/cadvisor -…"   12 hours ago     Up 12 minutes (healthy)   0.0.0.0:18080->8080/tcp                                            script_cadvisor_1
599e4001d2fd   192.168.74.129:84/blade/blade-gateway:2.8.0.RELEASE       "java -Djava.securit…"   12 hours ago     Up 13 minutes             80/tcp                                                             script_blade-gateway2_1
c1c3d225a26e   192.168.74.129:84/blade/blade-desk:2.8.0.RELEASE          "java -Djava.securit…"   12 hours ago     Up 13 minutes             8105/tcp                                                           script_blade-desk_1
52d8366d6cba   192.168.74.129:84/blade/blade-user:2.8.0.RELEASE          "java -Djava.securit…"   12 hours ago     Up 13 minutes             8102/tcp                                                           script_blade-user_1
c9fe9b67c750   192.168.74.129:84/blade/blade-auth:2.8.0.RELEASE          "java -Djava.securit…"   12 hours ago     Up 13 minutes             8100/tcp                                                           script_blade-auth1_1
cd3937ce2fe4   192.168.74.129:84/blade/blade-gateway:2.8.0.RELEASE       "java -Djava.securit…"   12 hours ago     Up 13 minutes             80/tcp                                                             script_blade-gateway1_1
2aad6871e479   192.168.74.129:84/blade/blade-auth:2.8.0.RELEASE          "java -Djava.securit…"   12 hours ago     Up 13 minutes             8100/tcp                                                           script_blade-auth2_1
54e092779a2a   192.168.74.129:84/blade/blade-log:2.8.0.RELEASE           "java -Djava.securit…"   12 hours ago     Up 13 minutes             8103/tcp                                                           script_blade-log_1
e7b3fb754415   192.168.74.129:84/blade/blade-system:2.8.0.RELEASE        "java -Djava.securit…"   12 hours ago     Up 13 minutes             8106/tcp                                                           script_blade-system_1
a3354a55d113   192.168.74.129:84/blade/blade-resource:2.8.0.RELEASE      "java -Djava.securit…"   12 hours ago     Up 13 minutes             8010/tcp                                                           script_blade-resource_1
01de0302d54d   192.168.74.129:84/blade/blade-swagger:2.8.0.RELEASE       "java -Djava.securit…"   12 hours ago     Up 13 minutes             0.0.0.0:18000->18000/tcp                                           script_blade-swagger_1
4d1ea7d02146   192.168.74.129:84/blade/blade-report:2.8.0.RELEASE        "java -Djava.securit…"   12 hours ago     Up 13 minutes             7003/tcp                                                           script_blade-report_1
798bba5f84c5   192.168.74.129:84/blade/blade-admin:2.8.0.RELEASE         "java -Djava.securit…"   12 hours ago     Up 14 minutes             0.0.0.0:7002->7002/tcp                                             script_blade-admin_1
caba2f9c00d7   192.168.74.129:84/blade/blade-turbine:2.8.0.RELEASE       "java -Djava.securit…"   12 hours ago     Up 14 minutes             0.0.0.0:7003->7003/tcp                                             script_blade-turbine_1
dcb84c4e0861   nacos/nacos-server:1.3.2                                  "bin/docker-startup.…"   12 hours ago     Up 24 minutes             0.0.0.0:8848->8848/tcp                                             script_nacos_1
b6bad9cf4e72   nginx:stable-alpine-perl                                  "/docker-entrypoint.…"   12 hours ago     Up 14 minutes             80/tcp, 0.0.0.0:88->88/tcp                                         script_blade-nginx_1
a3bd485fed41   seataio/seata-server:1.4.1                                "java -Djava.securit…"   12 hours ago     Up 14 minutes             0.0.0.0:8091->8091/tcp                                             script_seata-server_1
dc84b90d39c7   bladex/sentinel-dashboard:1.8.0                           "java -Djava.securit…"   12 hours ago     Up 14 minutes             8719/tcp, 0.0.0.0:8858->8858/tcp                                   script_sentinel_1
e9e617c9942b   redis:5.0.8-alpine                                        "docker-entrypoint.s…"   12 hours ago     Up 14 minutes             0.0.0.0:3379->6379/tcp                                             script_blade-redis_1
d1017f160b45   goharbor/harbor-jobservice:v2.2.0                         "/harbor/entrypoint.…"   15 hours ago     Up 15 hours (healthy)                                                                        harbor-jobservice

机构树

<template>
  <el-scrollbar>
    <basic-container>
      <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
    </basic-container>
  </el-scrollbar>
</template>
<script>
import ProjectCrud from "@/views/pd/dc/plan/project/ProjectCrud";
import {getDeptTree} from "@/api/system/dept";

export default {
  name: 'dept_tree',
  components: {ProjectCrud},
  data() {
    return {
      treeDeptId: '',
      treeData: [],
      treeOption: {
        nodeKey: 'id',
        addBtn: false,
        menu: false,
        size: 'small',
        props: {
          labelText: '标题',
          label: 'title',
          value: 'value',
          children: 'children'
        }
      },
    }
  },
  mounted() {

  },
  //
  created() {
    console.log(1111)
    this.initData('PD_DC')
  },
  methods: {
    initData(tenantId) {
      getDeptTree(tenantId).then(res => {
        this.treeData = res.data.data;
      });
    },
    nodeClick(data) {
      this.treeDeptId = data.id;
      this.page.currentPage = 1;
      // this.onLoad(this.page);
    },
  }
}
</script>

<style lang='scss' scope>

</style>



    <select id="tree" resultMap="treeNodeResultMap">
        select id, parent_id, dept_name as title, id as "value", id as "key" from blade_dept where is_deleted = 0
        <if test="_parameter!=null and _parameter!=''">
            and tenant_id = #{_parameter}
        </if>
        ORDER BY sort
    </select>

	@Override
	public List<DeptVO> tree(String tenantId) {
		return ForestNodeMerger.merge(baseMapper.tree(tenantId));
	}


	/**
	 * 获取部门树形结构
	 *
	 * @return
	 */
	@GetMapping("/tree")
	@ApiOperationSupport(order = 4)
	@ApiOperation(value = "树形结构", notes = "树形结构")
	public R<List<DeptVO>> tree(String tenantId, BladeUser bladeUser) {
		List<DeptVO> tree = deptService.tree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()));
		return R.data(tree);
	}

常见问题

重构

java: java.util.ServiceConfigurationError: javax.annotation.processing.Processor: Provider org.springblade.core.auto.factories.AutoFactoriesProcessor not found

META-INF/services/javax.annotation.processing.Processor 中定义的内容不能和当前项目在一起,需要放到额外的jar包中