Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
U
UEditor-OSS
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
毛洋
UEditor-OSS
Commits
d30171fd
提交
d30171fd
authored
8月 24, 2020
作者:
javamaoyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init
上级
f6b09a5e
流水线
#8624
已失败 于阶段
in 6 seconds
变更
5
流水线
1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
809 行增加
和
741 行删除
+809
-741
pom.xml
pom.xml
+6
-0
UEditorController.java
src/main/java/com/example/controller/UEditorController.java
+20
-6
AliyunOSSUtil.java
src/main/java/com/example/util/AliyunOSSUtil.java
+278
-238
application.yml
src/main/resources/application.yml
+0
-0
ueditor.config.js
src/main/resources/static/ueditor.config.js
+505
-497
没有找到文件。
pom.xml
浏览文件 @
d30171fd
...
...
@@ -48,6 +48,12 @@
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.json
</groupId>
<artifactId>
json
</artifactId>
...
...
src/main/java/com/example/controller/UEditorController.java
浏览文件 @
d30171fd
...
...
@@ -2,10 +2,16 @@ package com.example.controller;
import
com.example.baidu.ueditor.ActionEnter
;
import
com.example.baidu.ueditor.ConfigManager
;
import
com.example.util.AliyunOSSConfigConstant
;
import
com.example.util.AliyunOSSUtil
;
import
com.example.util.DataConfig
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.core.env.Environment
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -13,17 +19,20 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.HashMap
;
import
java.util.Map
;
@Controller
public
class
UEditorController
{
@Value
(
"${oss.host}"
)
private
String
imageUrl
;
private
Map
<
String
,
AliyunOSSConfigConstant
>
projectMap
=
new
HashMap
<
String
,
AliyunOSSConfigConstant
>();
@Autowired
private
AliyunOSSUtil
aliyunOSSUtil
;
@Value
(
"${oss.folder}"
)
private
String
ossPath
;
@RequestMapping
(
"/"
)
private
String
showPage
()
{
...
...
@@ -33,7 +42,12 @@ public class UEditorController {
@RequestMapping
(
value
=
"/config"
)
public
void
config
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
env
=
request
.
getParameter
(
"env"
);
AliyunOSSConfigConstant
aliyunOSSConfigConstant
=
aliyunOSSUtil
.
getOssConfig
(
env
);
//OSSConfigConstant oSSConfigConstant=ev.getProperty("projectMap.woyou", OSSConfigConstant.class);
response
.
setContentType
(
"application/json"
);
String
rootPath
=
request
.
getSession
().
getServletContext
().
getRealPath
(
"/"
);
try
{
...
...
@@ -43,8 +57,8 @@ public class UEditorController {
String
exec
=
new
ActionEnter
(
request
,
rootPath
).
exec
();
//exec=exec.replace("\"imageUrlPrefix\":\"https://imgb.mofangx.com/\"","'imageUrlPrefix':'"+imageUrlPrefix+"'");
exec
=
exec
.
replace
(
"{imgUrl}"
,
imageUrl
+
"/"
);
exec
=
exec
.
replace
(
"{basePath}"
,
ossPath
);
exec
=
exec
.
replace
(
"{imgUrl}"
,
aliyunOSSConfigConstant
.
getHost
()
+
"/"
);
exec
=
exec
.
replace
(
"{basePath}"
,
aliyunOSSConfigConstant
.
getFolder
()
);
//exec=exec.replace("'basePath':'erp/'","'basePath':'"+ossPath+"'");
...
...
src/main/java/com/example/util/AliyunOSSUtil.java
浏览文件 @
d30171fd
差异被折叠。
点击展开。
src/main/resources/application.
properties
→
src/main/resources/application.
yml
浏览文件 @
d30171fd
File moved
src/main/resources/static/ueditor.config.js
浏览文件 @
d30171fd
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论