diff --git a/README.md b/README.md index 15726c5..8537bf5 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,38 @@ -## 简介 -blade-tool 是如梦技术团队作品, 是一个基于 Spring Boot 2 & Spring Cloud Finchley ,封装组合大量组件,用于快速构建中大型API、RESTful API项目的核心包。 +
+
+
+
+
## 工程结构
```
blade-tool
├── blade-core-boot -- 业务包综合模块
+├── blade-core-cloud -- cloud封装模块
+├── blade-core-develop -- 代码生成封装模块
├── blade-core-launch -- 基础启动模块
├── blade-core-log -- 日志封装模块
├── blade-core-mybatis -- mybatis拓展封装模块
+├── blade-core-oss -- 对象存储封装模块
├── blade-core-secure -- 安全模块
├── blade-core-swagger -- swagger拓展封装模块
+├── blade-core-test -- 单元测试封装模块
└── blade-core-tool -- 工具包模块
```
@@ -29,34 +44,126 @@ LGPL是GPL的一个为主要为类库使用设计的开源协议。和GPL要求
但是如果修改LGPL协议的代码或者衍生,则所有修改的代码,涉及修改部分的额外代码和衍生的代码都必须采用LGPL协议。因此LGPL协议的开源代码很适合作为第三方类库被商业软件引用,但不适合希望以LGPL协议代码为基础,通过修改和衍生的方式做二次开发的商业软件采用。
-## 用户权益
-* 允许以引入不改源码的形式免费用于学习、毕设、公司项目、私活等。
-* 特殊情况修改代码,但仍然想闭源需经过作者同意。
+## 官网
+* 官网地址:[https://bladex.vip](https://bladex.vip)
+* 问答社区:[https://sns.bladex.vip](https://sns.bladex.vip)
+* 会员计划:[SpringBlade会员计划](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade会员计划)
+* 交流群:`477853168`
-## 禁止事项
-* 直接将本项目挂淘宝等商业平台出售。
+## 在线演示
+* Sword演示地址:[https://sword.bladex.vip](https://sword.bladex.vip)
+* Saber演示地址:[https://saber.bladex.vip](https://saber.bladex.vip)
+
+## 项目地址
+* 后端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/2.0-boot/](https://gitee.com/smallc/SpringBlade/tree/2.0-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)
+* 核心框架项目地址:[https://github.com/chillzhuang/blade-tool](https://github.com/chillzhuang/blade-tool)
+
+## 技术文档
+* [SpringBlade开发手册](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册)
+
+## 用户权益
+* 允许免费用于学习、毕设、公司项目、私活等。
+* 代码文件需保留相关license信息。
+* 禁止直接将本项目挂淘宝等商业平台出售。
* 非界面代码50%以上相似度的二次开源,二次开源需先联系作者。
-注意:若禁止条款被发现有权追讨19999的授权费。
+# 界面
-## [SpringBlade2.0](https://gitee.com/smallc/SpringBlade) 界面一览(开源协议为Apache License)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+## [BladeX](https://bladex.vip/#/vip) 工作流一览
+![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ |
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
![]() |
+ ![]() |
+
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * http://www.gnu.org/licenses/lgpl.html + *
+ * 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.core.secure;
+
+import lombok.Data;
+
+/**
+ * TokenInfo
+ *
+ * @author Chill
+ */
+@Data
+public class TokenInfo {
+
+ /**
+ * 令牌值
+ */
+ private String token;
+
+ /**
+ * 过期秒数
+ */
+ private int expire;
+
+}
diff --git a/blade-core-secure/src/main/java/org/springblade/core/secure/registry/SecureRegistry.java b/blade-core-secure/src/main/java/org/springblade/core/secure/registry/SecureRegistry.java
index 0f4544b..231f30d 100644
--- a/blade-core-secure/src/main/java/org/springblade/core/secure/registry/SecureRegistry.java
+++ b/blade-core-secure/src/main/java/org/springblade/core/secure/registry/SecureRegistry.java
@@ -43,6 +43,7 @@ public class SecureRegistry {
this.defaultExcludePatterns.add("/token/**");
this.defaultExcludePatterns.add("/log/**");
this.defaultExcludePatterns.add("/user/user-info");
+ this.defaultExcludePatterns.add("/user/user-info-by-id");
this.defaultExcludePatterns.add("/menu/auth-routes");
this.defaultExcludePatterns.add("/error/**");
this.defaultExcludePatterns.add("/assets/**");
diff --git a/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java b/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java
index b353b6b..dd61e7b 100644
--- a/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java
+++ b/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java
@@ -22,6 +22,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
import lombok.SneakyThrows;
import org.springblade.core.launch.constant.TokenConstant;
import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.TokenInfo;
import org.springblade.core.secure.constant.SecureConstant;
import org.springblade.core.secure.exception.SecureException;
import org.springblade.core.secure.provider.IClientDetails;
@@ -293,21 +294,24 @@ public class SecureUtil {
/**
* 创建令牌
*
- * @param user user
- * @param audience audience
- * @param issuer issuer
- * @param isExpire isExpire
+ * @param user user
+ * @param audience audience
+ * @param issuer issuer
+ * @param tokenType tokenType
* @return jwt
*/
- public static String createJWT(Map
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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.core.swagger;
+
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+import com.google.common.base.Predicate;
+import springfox.documentation.RequestHandler;
+
+import java.util.List;
+
+/**
+ * Swagger工具类
+ *
+ * @author Chill
+ */
+public class SwaggerUtil {
+
+ /**
+ * 获取包集合
+ *
+ * @param basePackages 多个包名集合
+ */
+ public static Predicate