Skip to content

Commit

Permalink
Merge remote-tracking branch 'source/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java
  • Loading branch information
jiangqiang1996 committed Jul 9, 2022
2 parents 84ef0b4 + ed097e5 commit 6a1c09c
Show file tree
Hide file tree
Showing 274 changed files with 1,454 additions and 5,507 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ nbdist/

### JRebel ###
rebel.xml

application-my.yaml
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* 权限认证使用 Spring Security & Token & Redis,支持多终端、多种用户的认证系统。
* 支持加载动态权限菜单,按钮级别权限控制,本地缓存提升性能。
* 支持 SaaS 多租户系统,可自定义每个租户的权限,提供透明化的多租户底层封装。
* 工作流使用 Activiti + Flowable,支持动态表单、在线设计流程、多种任务分配方式。
* 工作流使用 Flowable,支持动态表单、在线设计流程、会签 / 或签、多种任务分配方式。
* 高效率开发,使用代码生成器可以一键生成前后端代码 + 单元测试 + Swagger 接口文档 + Validator 参数校验。
* 集成微信小程序、微信公众号、企业微信、钉钉等三方登陆,集成支付宝、微信等支付与退款。
* 集成阿里云、腾讯云、云片等短信渠道,集成 MinIO、阿里云、腾讯云、七牛云等云存储服务。
Expand Down Expand Up @@ -167,7 +167,7 @@ ps:核心功能已经实现,正在对接微信小程序中...
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 5.3.20 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) |
| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 5.6.5 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) |
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.2.3 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) |
| [Activiti](https://github.com/Activiti/Activiti) | 工作流引擎 | 7.1.0.M6 | [文档](TODO) |
| [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 6.7.0 | [文档](https://doc.iocoder.cn/bpm/) |
| [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) |
| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 3.0.3 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) |
| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.1 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) |
Expand Down
8 changes: 7 additions & 1 deletion yudao-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<transmittable-thread-local.version>2.12.2</transmittable-thread-local.version>
<commons-net.version>3.8.0</commons-net.version>
<jsch.version>0.1.55</jsch.version>
<tika-core.version>2.4.1</tika-core.version>
<!-- 三方云服务相关 -->
<minio.version>8.2.2</minio.version>
<aliyun-java-sdk-core.version>4.5.25</aliyun-java-sdk-core.version>
Expand Down Expand Up @@ -480,6 +481,12 @@
<version>${easyexcel.verion}</version>
</dependency>

<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId> <!-- 文件类型的识别 -->
<version>${tika-core.version}</version>
</dependency>

<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
Expand Down Expand Up @@ -587,7 +594,6 @@
<artifactId>justauth-spring-boot-starter</artifactId> <!-- 社交登陆(例如说,个人微信、企业微信等等) -->
<version>${justauth.version}</version>
</dependency>

</dependencies>
</dependencyManagement>

Expand Down
1 change: 0 additions & 1 deletion yudao-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
<module>yudao-spring-boot-starter-biz-data-permission</module>
<module>yudao-spring-boot-starter-biz-error-code</module>

<module>yudao-spring-boot-starter-activiti</module>
<module>yudao-spring-boot-starter-flowable</module>
</modules>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@ public static File createTempFile() {
return file;
}


public static void main(String[] args) {
}

}
48 changes: 0 additions & 48 deletions yudao-framework/yudao-spring-boot-starter-activiti/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions yudao-framework/yudao-spring-boot-starter-file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
<artifactId>jsch</artifactId> <!-- 解决 sftp 连接 -->
</dependency>

<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId> <!-- 文件类型的识别 -->
</dependency>

<!-- 三方云服务相关 -->
<dependency>
<groupId>io.minio</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package cn.iocoder.yudao.framework.file.core.utils;

import com.alibaba.ttl.TransmittableThreadLocal;
import lombok.SneakyThrows;
import org.apache.tika.Tika;

import java.io.ByteArrayInputStream;

/**
* 文件类型 Utils
*
* @author 芋道源码
*/
public class FileTypeUtils {

private static final ThreadLocal<Tika> TIKA = TransmittableThreadLocal.withInitial(Tika::new);

/**
* 获得文件的 mineType
*
* @param data 文件内容
* @return mineType
*/
@SneakyThrows
public static String getMineType(byte[] data) {
return TIKA.get().detect(new ByteArrayInputStream(data));
}

}
Loading

0 comments on commit 6a1c09c

Please sign in to comment.