Skip to content

Commit

Permalink
🎉 3.6.0.RELEASE vue3版前端正式发布
Browse files Browse the repository at this point in the history
  • Loading branch information
smallchill committed Apr 29, 2023
1 parent 647d85e commit fd5135e
Show file tree
Hide file tree
Showing 40 changed files with 291 additions and 253 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.

Copyright 2020 BladeX (https://bladex.vip)
Copyright 2023 BladeX (https://bladex.vip)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<p align="center">
<img src="https://img.shields.io/badge/Release-V3.5.0-green.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Release-V3.6.0-green.svg" alt="Downloads">
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status">
<img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status">
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.1-blue.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.10-blue.svg" alt="Downloads">
<a target="_blank" href="https://bladex.vip">
<img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads">
</a>
Expand Down Expand Up @@ -69,20 +69,22 @@ SpringBlade
* Sword-基于React:[https://sword.bladex.vip](https://sword.bladex.vip)

## 数据大屏
* Caster-数据大屏展示系统:[https://caster.bladex.vip](https://caster.bladex.vip)
* 数据大屏展示系统:[https://data.bladex.vip](https://data.bladex.vip)

## 技术文档
* [SpringBlade开发手册一览](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册)
* [SpringBlade常见问题集锦](https://sns.bladex.vip/article-14966.html)
* [SpringBlade基于Kuboard部署K8S](https://kuboard.cn/learning/k8s-practice/spring-blade/)
* [SpringBlade基于Rainbond部署](https://www.rainbond.com/docs/micro-service/example/blade)

## 项目地址
* 核心框架项目地址:[https://gitee.com/smallc/blade-tool](https://gitee.com/smallc/blade-tool)
* 后端Gitee地址:[https://gitee.com/smallc/SpringBlade](https://gitee.com/smallc/SpringBlade)
* 后端Github地址:[https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade)
* 后端SpringBoot版:[https://gitee.com/smallc/SpringBlade/tree/boot/](https://gitee.com/smallc/SpringBlade/tree/boot/)
* 前端框架Sword(基于React):[https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword)
* 前端框架Saber(基于Vue):[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
* 前端框架Saber(基于Vue2):[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
* 前端框架Saber3(基于Vue3):[https://gitee.com/smallc/Saber3](https://gitee.com/smallc/Saber/tree/3.x/)

# 开源协议
Apache Licence 2.0 ([英文原文](http://www.apache.org/licenses/LICENSE-2.0.html)
Expand Down
3 changes: 2 additions & 1 deletion blade-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>

<artifactId>blade-auth</artifactId>
Expand Down Expand Up @@ -63,6 +63,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.springblade.test;

import org.springblade.core.tool.utils.RandomType;
import org.springblade.core.tool.utils.StringUtil;

/**
* signKey生成器
*
* @author Chill
*/
public class SignKeyGenerator {

public static void main(String[] args) {
System.out.println("=======================================================");
for (int i = 0; i < 10; i++) {
String signKey = StringUtil.random(32, RandomType.ALL);
System.out.println("SpringBlade SignKey:[" + signKey + "] ");
}
System.out.println("=======================================================");
System.out.println("====== blade.token.sign-key 的值从中挑选一个便可 =========");
System.out.println("=======================================================");
}

}
2 changes: 1 addition & 1 deletion blade-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
3 changes: 1 addition & 2 deletions blade-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -68,7 +68,6 @@
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
<version>${alibaba.cloud.version}</version>
</dependency>
<!-- JWT -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 ([email protected]).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springblade.gateway.config;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.gateway.props.JwtProperties;
import org.springblade.gateway.utils.JwtUtil;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
* JWT配置信息
*
* @author Chill
*/
@Slf4j
@Configuration(proxyBeanMethods = false)
@AllArgsConstructor
@EnableConfigurationProperties({JwtProperties.class})
public class JwtConfiguration implements SmartInitializingSingleton {

private final JwtProperties properties;

@Override
public void afterSingletonsInstantiated() {
JwtUtil.setJwtProperties(properties);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class RouterFunctionConfiguration {
/**
* 这里为支持的请求头,如果有自定义的header字段请自己添加
*/
private static final String ALLOWED_HEADERS = "X-Requested-With, Tenant-Id, Blade-Auth, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, username, client, knfie4j-gateway-request, request-origion";
private static final String ALLOWED_HEADERS = "X-Requested-With, Tenant-Id, Blade-Auth, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, username, client, knfie4j-gateway-request, knife4j-gateway-code, request-origion";
private static final String ALLOWED_METHODS = "GET,POST,PUT,DELETE,OPTIONS,HEAD";
private static final String ALLOWED_ORIGIN = "*";
private static final String ALLOWED_EXPOSE = "*";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 ([email protected])
*/
package org.springblade.gateway.props;

import io.jsonwebtoken.JwtException;
import lombok.Data;
import org.springblade.core.launch.constant.TokenConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
* JWT配置
*
* @author Chill
*/
@Data
@ConfigurationProperties("blade.token")
public class JwtProperties {

/**
* token是否有状态
*/
private Boolean state = Boolean.FALSE;

/**
* 是否只可同时在线一人
*/
private Boolean single = Boolean.FALSE;

/**
* token签名
*/
private String signKey = "";

/**
* 获取签名规则
*/
public String getSignKey() {
if (this.signKey.length() < TokenConstant.SIGN_KEY_LENGTH) {
throw new JwtException("请配置 blade.token.sign-key 的值, 长度32位以上");
}
return this.signKey;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import org.springblade.core.launch.constant.TokenConstant;
import org.springblade.gateway.props.JwtProperties;

import java.nio.charset.StandardCharsets;
import java.util.Base64;
Expand All @@ -29,11 +30,30 @@
*/
public class JwtUtil {

public static String SIGN_KEY = TokenConstant.SIGN_KEY;
public static String BEARER = TokenConstant.BEARER;
public static Integer AUTH_LENGTH = 7;

public static String BASE64_SECURITY = Base64.getEncoder().encodeToString(SIGN_KEY.getBytes(StandardCharsets.UTF_8));
/**
* jwt配置
*/
private static JwtProperties jwtProperties;

public static JwtProperties getJwtProperties() {
return jwtProperties;
}

public static void setJwtProperties(JwtProperties properties) {
if (JwtUtil.jwtProperties == null) {
JwtUtil.jwtProperties = properties;
}
}

/**
* 签名加密
*/
public static String getBase64Security() {
return Base64.getEncoder().encodeToString(getJwtProperties().getSignKey().getBytes(StandardCharsets.UTF_8));
}

/**
* 获取token串
Expand Down Expand Up @@ -61,7 +81,7 @@ public static String getToken(String auth) {
public static Claims parseJWT(String jsonWebToken) {
try {
return Jwts.parserBuilder()
.setSigningKey(Base64.getDecoder().decode(JwtUtil.BASE64_SECURITY)).build()
.setSigningKey(Base64.getDecoder().decode(getBase64Security())).build()
.parseClaimsJws(jsonWebToken).getBody();
} catch (Exception ex) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
19 changes: 1 addition & 18 deletions blade-ops/blade-develop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-ops</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -33,23 +33,6 @@
<artifactId>blade-core-develop</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Swagger-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger.models.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-dict-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-ops</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-resource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-seata-order/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-seata-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
10 changes: 8 additions & 2 deletions blade-ops/blade-swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -23,8 +23,14 @@
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
<version>${knife4j.version}</version>
</dependency>
<!--Mac M1笔记本会报错,参考:https://github.com/netty/netty/issues/11020-->
<!--<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>${netty.resolver.version}</version>
<classifier>osx-aarch_64</classifier>
</dependency>-->
</dependencies>

<build>
Expand Down
4 changes: 2 additions & 2 deletions blade-ops/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.5.0</version>
<version>3.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>blade-ops</artifactId>
<name>${project.artifactId}</name>
<version>3.5.0</version>
<version>3.6.0</version>
<packaging>pom</packaging>
<modules>
<module>blade-admin</module>
Expand Down
Loading

0 comments on commit fd5135e

Please sign in to comment.