Browse Source

1.更新3.1.0

test
pref_mail@163.com 2 years ago
parent
commit
387d2c5a03
  1. 8
      blade-biz-common/pom.xml
  2. 31
      blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java
  3. 1
      blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
  4. 2
      blade-gateway/pom.xml
  5. 11
      blade-service-api/pom.xml
  6. 34
      blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java
  7. 4
      blade-service/pom.xml
  8. 4
      doc/nacos/blade-demo-dev.yaml
  9. 12
      doc/nacos/blade.yaml
  10. 1
      doc/nacos/routes/blade-gateway-dev.json
  11. 35
      pom.xml
  12. 2
      script/docker/app/.env
  13. 11
      script/docker/app/deploy.sh
  14. 41
      script/docker/app/docker-compose.yml

8
blade-biz-common/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.0.1.RELEASE</version>
<version>3.1.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -28,12 +28,6 @@
<artifactId>blade-core-auto</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.16</version>
</dependency>
</dependencies>
<build>

31
blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java

@ -27,6 +27,16 @@ import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_
*/
public interface LauncherConstant {
/**
* xxljob
*/
String APPLICATION_XXLJOB_NAME = APPLICATION_NAME_PREFIX + "xxljob";
/**
* xxljob
*/
String APPLICATION_XXLJOB_ADMIN_NAME = APPLICATION_NAME_PREFIX + "xxljob-admin";
/**
* nacos namespace id
*/
@ -45,7 +55,7 @@ public interface LauncherConstant {
/**
* nacos test 地址
*/
String NACOS_TEST_ADDR = "172.30.0.48:8848";
String NACOS_TEST_ADDR = "192.168.10.210:8848";
/**
* sentinel dev 地址
@ -75,7 +85,7 @@ public interface LauncherConstant {
/**
* seata test 地址
*/
String SEATA_TEST_ADDR = "172.30.0.68:8091";
String SEATA_TEST_ADDR = "192.168.10.210:8091";
/**
* dbuuo提供者
@ -122,8 +132,6 @@ public interface LauncherConstant {
*/
String APPLICATION_STREAM_PROVIDER_NAME = APPLICATION_NAME_PREFIX + "stream-provider";
/**
* seata file模式
*/
@ -144,21 +152,6 @@ public interface LauncherConstant {
*/
String GROUP_NAME = "-group";
/**
* 工厂对接服务名称
*/
String APPLICATION_FACTORY_NAME = "logpm-factory";
String APPLICATION_XXL_JOB_NAME = "logpm-xxl-job";
/**
* seata 服务组格式
*

1
blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java

@ -40,7 +40,6 @@ public class LauncherServiceImpl implements LauncherService {
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.server-addr", LauncherConstant.nacosAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.group","DEFAULT_GROUP");
// dubbo注册
PropsUtil.setProperty(props, "dubbo.application.name", appName);

2
blade-gateway/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.0.1.RELEASE</version>
<version>3.1.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

11
blade-service-api/pom.xml

@ -5,20 +5,19 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.0.1.RELEASE</version>
<version>3.1.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-service-api</artifactId>
<name>${project.artifactId}</name>
<version>3.0.1.RELEASE</version>
<version>3.1.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务API集合</description>
<modules>
<module>logpm-factory-api</module>
</modules>
<dependencies>
@ -53,12 +52,6 @@
<artifactId>blade-core-auto</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-biz-common</artifactId>
<version>${bladex.project.version}</version>
</dependency>
</dependencies>
<build>

34
blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

@ -1,8 +1,42 @@
package com.logpm.factory;
import java.util.Random;
public class TestService {
public static void main(String[] args) {
String code = getCharAndNumr(32);
System.out.println(code);
}
/**
* 方法1生成随机数字和字母组合
* @param length
* @return
*/
public static String getCharAndNumr(int length) {
Random random = new Random();
StringBuffer valSb = new StringBuffer();
String charStr = "0123456789abcdefghijklmnopqrstuvwxyz";
int charLength = charStr.length();
for (int i = 0; i < length; i++) {
int index = random.nextInt(charLength);
valSb.append(charStr.charAt(index));
}
return valSb.toString();
}
}

4
blade-service/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>3.0.1.RELEASE</version>
<version>3.1.0.RELEASE</version>
</parent>
<artifactId>blade-service</artifactId>
<name>${project.artifactId}</name>
<version>3.0.1.RELEASE</version>
<version>3.1.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务集合</description>

4
doc/nacos/blade-demo-dev.yaml

@ -1,12 +1,12 @@
#自定义配置
demo:
name: logpm-factory
name: demo-name
#放行配置
blade:
secure:
skip-url:
- /factory/**
- /demo/**
datasource:
demo:
master:

12
doc/nacos/blade.yaml

@ -59,22 +59,22 @@ knife4j:
enableRequestCache: true
enableFilterMultipartApis: false
enableFilterMultipartApiMethodType: POST
language: zh-CN
language: zh_cn
enableFooter: false
enableFooterCustom: true
footerCustomContent: Copyright © 2021 BladeX All Rights Reserved
footerCustomContent: Copyright © 2023 BladeX All Rights Reserved
#swagger公共信息
swagger:
title: BladeX 接口文档系统
description: BladeX 接口文档系统
version: 3.0.1.RELEASE
version: 3.1.0.RELEASE
license: Powered By BladeX
license-url: https://bladex.vip
terms-of-service-url: https://bladex.vip
contact:
name: smallchill
email: smallchill@163.com
name: 翼宿
email: bladejava@qq.com
url: https://gitee.com/smallc
#blade配置
@ -83,6 +83,8 @@ blade:
token:
#是否有状态
state: false
#token签名
sign-key: 请配置签名
#redis序列化方式
redis:
serializer-type: protostuff

1
doc/nacos/routes/blade-gateway-dev.json

@ -12,6 +12,7 @@
],
"filters": [],
"uri": "lb://blade-desk-me"
},
{
"id": "example-route",

35
pom.xml

@ -5,11 +5,11 @@
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>3.0.1.RELEASE</version>
<version>3.1.0.RELEASE</version>
<packaging>pom</packaging>
<properties>
<bladex.project.version>3.0.1.RELEASE</bladex.project.version>
<bladex.project.version>3.1.0.RELEASE</bladex.project.version>
<java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>
@ -19,10 +19,6 @@
<flowable.version>6.4.2</flowable.version>
<dubbo.version>2.7.8</dubbo.version>
<spring.boot.version>2.7.1</spring.boot.version>
<spring.cloud.version>2021.0.3</spring.cloud.version>
<spring.platform.version>Cairo-SR8</spring.platform.version>
<!-- 推荐使用Harbor -->
<docker.registry.url>192.168.0.157</docker.registry.url>
<docker.registry.host>http://${docker.registry.url}:2375</docker.registry.host>
@ -34,10 +30,12 @@
<modules>
<module>blade-biz-common</module>
<module>blade-example</module>
<module>blade-example-api</module>
<module>blade-gateway</module>
<module>blade-ops</module>
<module>blade-service</module>
<module>blade-service-api</module>
</modules>
<dependencyManagement>
@ -54,27 +52,6 @@
<artifactId>blade-biz-common</artifactId>
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>${spring.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
@ -104,7 +81,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<version>2.7.10</version>
<configuration>
<fork>true</fork>
<finalName>${project.build.finalName}</finalName>

2
script/docker/app/.env

@ -1,2 +1,2 @@
REGISTER=192.168.0.157/blade
TAG=3.0.1.RELEASE
TAG=3.1.0.RELEASE

11
script/docker/app/deploy.sh

@ -1,3 +1,4 @@
#!/bin/bash
#使用说明,用来提示输入参数
usage() {
@ -13,6 +14,8 @@ port(){
firewall-cmd --add-port=8000/tcp --permanent
#nacos
firewall-cmd --add-port=8848/tcp --permanent
firewall-cmd --add-port=9848/tcp --permanent
firewall-cmd --add-port=9849/tcp --permanent
#sentinel
firewall-cmd --add-port=8858/tcp --permanent
#grafana
@ -24,13 +27,11 @@ port(){
#admin
firewall-cmd --add-port=7002/tcp --permanent
#ureport
firewall-cmd --add-port=7003/tcp --permanent
firewall-cmd --add-port=8108/tcp --permanent
#zipkin
firewall-cmd --add-port=9411/tcp --permanent
#prometheus
firewall-cmd --add-port=9090/tcp --permanent
#flowdesign
firewall-cmd --add-port=9999/tcp --permanent
#swagger
firewall-cmd --add-port=18000/tcp --permanent
#firewalld
@ -90,12 +91,12 @@ base(){
#启动监控模块
monitor(){
docker-compose up -d blade-admin blade-turbine
docker-compose up -d blade-admin
}
#启动程序模块
modules(){
docker-compose up -d blade-gateway1 blade-gateway2 blade-auth1 blade-auth2 blade-swagger blade-report blade-user blade-desk blade-system blade-log blade-flow blade-flow-design blade-resource
docker-compose up -d blade-gateway1 blade-gateway2 blade-auth1 blade-auth2 blade-swagger blade-report blade-desk blade-system blade-log blade-flow blade-resource
}
#启动普罗米修斯模块

41
script/docker/app/docker-compose.yml

@ -6,16 +6,18 @@ services:
####################################################################################################
nacos:
image: nacos/nacos-server:1.3.2
image: nacos/nacos-server:2.1.2
hostname: "nacos-standalone"
environment:
- MODE=standalone
- TZ=Asia/Shanghai
volumes:
- /docker/nacos/standalone-logs/:/home/nacos/logs
- /docker/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
- /docker/nacos/conf/application.properties:/home/nacos/conf/application.properties
ports:
- 8848:8848
- 9848:9848
- 9849:9849
networks:
blade_net:
ipv4_address: 172.30.0.48
@ -33,7 +35,7 @@ services:
ipv4_address: 172.30.0.58
seata-server:
image: seataio/seata-server:1.4.1
image: seataio/seata-server:1.6.1
hostname: "seata-server"
ports:
- 8091:8091
@ -116,17 +118,6 @@ services:
networks:
- blade_net
blade-turbine:
image: "${REGISTER}/blade-turbine:${TAG}"
environment:
- TZ=Asia/Shanghai
ports:
- 7003:7003
privileged: true
restart: always
networks:
- blade_net
blade-gateway1:
image: "${REGISTER}/blade-gateway:${TAG}"
environment:
@ -173,6 +164,8 @@ services:
- TZ=Asia/Shanghai
privileged: true
restart: always
ports:
- 8108:8108
networks:
blade_net:
ipv4_address: 172.30.0.98
@ -195,15 +188,6 @@ services:
networks:
- blade_net
blade-user:
image: "${REGISTER}/blade-user:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
restart: always
networks:
- blade_net
blade-system:
image: "${REGISTER}/blade-system:${TAG}"
environment:
@ -222,17 +206,6 @@ services:
networks:
- blade_net
blade-flow-design:
image: "${REGISTER}/blade-flow-design:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
restart: always
ports:
- 9999:9999
networks:
- blade_net
blade-resource:
image: "${REGISTER}/blade-resource:${TAG}"
environment:

Loading…
Cancel
Save