2 Star 8 Fork 3

MK / spring-boot-starter-ueditor-oss

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

spring-boot-mvc-ueditor-qiniu

spring boot 、springMVC环境集成百度ueditor富文本编辑器,使用七牛云存储图片

依赖库版本:

  • spring boot : 1.5.3.RELEASE
  • aliyun-sdk-oss : 2.8.1
  • 基于ueditor : 1.4.3.3版本源码修改

此版本更新说明:

  • 将spring-boot-mvc-ueditor-oss源码与demo放入同一个maven项目中
  • 更新了spring boot版本,阿里oss版本

参考源码:https://github.com/zrk1000/spring-boot-mvc-ueditor-qiniu

在spring boot环境中,只需引入jar,配置文件中添加config.json配置及阿里OSS相关配置即可使用。

##使用:

1、引入jar (源码在github,请自行编译后再引入):

<!--注意:此版本与上个版本maven坐标不同,-->
<dependency>
    <groupId>win.demonlegion</groupId>
    <artifactId>spring-boot-mvc-ueditor-oss</artifactId>
    <version>ueditor1.4.3.3-oss2.8.1</version>
</dependency>

2、spring boot启动类添加扫描: @ComponentScan(basePackages = {“com.baidu”}):

@Controller
@ComponentScan(basePackages = {"com.zrk","com.baidu"})
@SpringBootApplication
public class SpringBootMvcUeditorQiniuDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootMvcUeditorQiniuDemoApplication.class, args);
    }

    @RequestMapping("/")
    public String index(){
        return "ueditor";
    }

}

3、application.properties中添加ueditor的config.json配置,和七牛相关配置:

spring.thymeleaf.enabled=true

spring.http.multipart.max-file-size=500MB
spring.http.multipart.max-request-size=20MB

ueditor.config={"imageActionName":"uploadimage","imageFieldName":"upfile","imageMaxSize":2048000,"imageAllowFiles":[".png",".jpg",".jpeg",".gif",".bmp"],"imageCompressEnable":true,"imageCompressBorder":1600,"imageInsertAlign":"none","imageUrlPrefix":"","imagePathFormat":"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}","scrawlActionName":"uploadscrawl","scrawlFieldName":"upfile","scrawlPathFormat":"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}","scrawlMaxSize":2048000,"scrawlUrlPrefix":"","scrawlInsertAlign":"none","snapscreenActionName":"uploadimage","snapscreenPathFormat":"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}","snapscreenUrlPrefix":"","snapscreenInsertAlign":"none","catcherLocalDomain":["127.0.0.1","localhost","img.baidu.com"],"catcherActionName":"catchimage","catcherFieldName":"source","catcherPathFormat":"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}","catcherUrlPrefix":"","catcherMaxSize":2048000,"catcherAllowFiles":[".png",".jpg",".jpeg",".gif",".bmp"],"videoActionName":"uploadvideo","videoFieldName":"upfile","videoPathFormat":"/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}","videoUrlPrefix":"","videoMaxSize":102400000,"videoAllowFiles":[".flv",".swf",".mkv",".avi",".rm",".rmvb",".mpeg",".mpg",".ogg",".ogv",".mov",".wmv",".mp4",".webm",".mp3",".wav",".mid"],"fileActionName":"uploadfile","fileFieldName":"upfile","filePathFormat":"/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}","fileUrlPrefix":"","fileMaxSize":51200000,"fileAllowFiles":[".png",".jpg",".jpeg",".gif",".bmp",".flv",".swf",".mkv",".avi",".rm",".rmvb",".mpeg",".mpg",".ogg",".ogv",".mov",".wmv",".mp4",".webm",".mp3",".wav",".mid",".rar",".zip",".tar",".gz",".7z",".bz2",".cab",".iso",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".pdf",".txt",".md",".xml"],"imageManagerActionName":"listimage","imageManagerListPath":"/ueditor/jsp/upload/image/","imageManagerListSize":20,"imageManagerUrlPrefix":"","imageManagerInsertAlign":"none","imageManagerAllowFiles":[".png",".jpg",".jpeg",".gif",".bmp"],"fileManagerActionName":"listfile","fileManagerListPath":"/ueditor/jsp/upload/file/","fileManagerUrlPrefix":"","fileManagerListSize":20,"fileManagerAllowFiles":[".png",".jpg",".jpeg",".gif",".bmp",".flv",".swf",".mkv",".avi",".rm",".rmvb",".mpeg",".mpg",".ogg",".ogv",".mov",".wmv",".mp4",".webm",".mp3",".wav",".mid",".rar",".zip",".tar",".gz",".7z",".bz2",".cab",".iso",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".pdf",".txt",".md",".xml"]}
# 阿里云Auth配置
ueditor.endpoint=
ueditor.access-key-id=
ueditor.access-key-secret=
# 阿里云bucket
ueditor.bucket=
ueditor.base-url=

ueditor.upload-dir-prefix=

空文件

简介

基于https://github.com/zrk1000/spring-boot-mvc-ueditor-qiniu代码修改七牛云为阿里OSS 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/lin199231/spring-boot-mvc-ueditor-oss.git
git@gitee.com:lin199231/spring-boot-mvc-ueditor-oss.git
lin199231
spring-boot-mvc-ueditor-oss
spring-boot-starter-ueditor-oss
master

搜索帮助