Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
b5ba1bf1
"src/main/vscode:/vscode.git/clone" did not exist on "1f526b0cb8eff4bf3a7b9442a8bf8a834529330e"
Commit
b5ba1bf1
authored
Sep 29, 2019
by
sgjj
Browse files
自定义文件夹
parent
1a1dd38d
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/action/ArticleAction.java
View file @
b5ba1bf1
...
@@ -535,6 +535,7 @@ public class ArticleAction extends BaseAction {
...
@@ -535,6 +535,7 @@ public class ArticleAction extends BaseAction {
}
}
model
.
addAttribute
(
"columnType"
,
columnType
);
model
.
addAttribute
(
"columnType"
,
columnType
);
model
.
addAttribute
(
"categoryId"
,
column
.
getCategoryId
());
// 编辑封面
model
.
addAttribute
(
"categoryId"
,
column
.
getCategoryId
());
// 编辑封面
model
.
addAttribute
(
"websiteId"
,
BasicUtil
.
getAppId
());
return
"/cms/article/article_form"
;
return
"/cms/article/article_form"
;
}
else
{
// 非法
}
else
{
// 非法
// return "/cms/article/article_form");
// return "/cms/article/article_form");
...
...
src/main/java/net/mingsoft/cms/action/ColumnAction.java
View file @
b5ba1bf1
...
@@ -93,6 +93,8 @@ public class ColumnAction extends BaseAction{
...
@@ -93,6 +93,8 @@ public class ColumnAction extends BaseAction{
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"websiteId"
,
appId
);
return
"/basic/column/form"
;
return
"/basic/column/form"
;
}
}
...
@@ -216,6 +218,7 @@ public class ColumnAction extends BaseAction{
...
@@ -216,6 +218,7 @@ public class ColumnAction extends BaseAction{
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"listColumn"
,
JSONArray
.
toJSONString
(
list
));
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"model"
,
"cms"
);
model
.
addAttribute
(
"websiteId"
,
appId
);
return
"/basic/column/form"
;
return
"/basic/column/form"
;
}
}
...
...
src/main/java/net/mingsoft/config/WebConfig.java
View file @
b5ba1bf1
...
@@ -72,9 +72,9 @@ public class WebConfig implements WebMvcConfigurer {
...
@@ -72,9 +72,9 @@ public class WebConfig implements WebMvcConfigurer {
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"/app/"
,
"file:app/"
,
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"/app/"
,
"file:app/"
,
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/static/**"
,
"/**"
).
addResourceLocations
(
"/static/"
,
"file:static/"
,
"classpath:/static/"
);
registry
.
addResourceHandler
(
"/static/**"
,
"/**"
).
addResourceLocations
(
"/static/"
,
"file:static/"
,
"classpath:/static/"
);
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"/api/"
,
"file:api/"
,
"classpath:/api/"
);
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"/api/"
,
"file:api/"
,
"classpath:/api/"
);
if
(
uploadFloderPath
.
startsWith
(
"file:"
)){
if
(
new
File
(
uploadFloderPath
).
isAbsolute
(
)){
//如果指定了绝对路径,上传的文件都映射到uploadMapping下
//如果指定了绝对路径,上传的文件都映射到uploadMapping下
registry
.
addResourceHandler
(
uploadMapping
).
addResourceLocations
(
uploadFloderPath
+
File
.
separator
registry
.
addResourceHandler
(
uploadMapping
).
addResourceLocations
(
"file:"
+
uploadFloderPath
+
File
.
separator
//映射其他路径文件
//映射其他路径文件
//,file:F://images
//,file:F://images
);
);
...
...
src/main/resources/application.yml
View file @
b5ba1bf1
...
@@ -15,12 +15,8 @@ ms:
...
@@ -15,12 +15,8 @@ ms:
path
:
/upload
path
:
/upload
mapping
:
/upload/**
mapping
:
/upload/**
denied
:
.exe,.jsp
denied
:
.exe,.jsp
allowed
:
jpg
max-size
:
1
memory-size
:
4096
spring
:
spring
:
http.multipart.enabled
:
false
profiles
:
profiles
:
active
:
dev
active
:
dev
mvc
:
mvc
:
...
...
src/main/webapp/WEB-INF/manager/cms/article/article_form.ftl
View file @
b5ba1bf1
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
listKey="id" listValue="value" label="是否显示" help="选择否后前端将不显示,需要重新生成才有效果"
listKey="id" listValue="value" label="是否显示" help="选择否后前端将不显示,需要重新生成才有效果"
/>
/>
<@ms.formRow colSm="2" label="文章缩略图" width="400" >
<@ms.formRow colSm="2" label="文章缩略图" width="400" >
<@ms.uploadImg path="
article" uploadFloderPath="$
{
articleImagesUrl
?
default
(
''
)}
" inputName="basicThumbnails" size="1" msg="提示:文章缩略图,支持jpg格式" imgs="$
{
article
.basicThumbnails
?
default
(
''
)}
" />
<@ms.uploadImg path="
$
{
websiteId
}
/article
" inputName="basicThumbnails" size="1" msg="提示:文章缩略图,支持jpg格式" imgs="$
{
article
.basicThumbnails
?
default
(
''
)}
" />
</@ms.formRow>
</@ms.formRow>
<@ms.text name="articleSource" colSm="2" width="200" label="文章来源" title="文章来源" size="5" placeholder="请输入文章来源" value="$
{
article
.articleSource
?
default
(
''
)}
" validation=
{
"maxlength"
:
"300"
,
"data-bv-stringlength-message"
:
"文章来源在300个字符以内!"
}
/>
<@ms.text name="articleSource" colSm="2" width="200" label="文章来源" title="文章来源" size="5" placeholder="请输入文章来源" value="$
{
article
.articleSource
?
default
(
''
)}
" validation=
{
"maxlength"
:
"300"
,
"data-bv-stringlength-message"
:
"文章来源在300个字符以内!"
}
/>
<@ms.text name="articleAuthor" colSm="2" width="200" label="文章作者" title="文章作者" size="5" placeholder="请输入文章作者" value="$
{
article
.articleAuthor
?
default
(
''
)}
" validation=
{
"maxlength"
:
"12"
,
"data-bv-stringlength-message"
:
"文章作者在12个字符以内!"
}
/>
<@ms.text name="articleAuthor" colSm="2" width="200" label="文章作者" title="文章作者" size="5" placeholder="请输入文章作者" value="$
{
article
.articleAuthor
?
default
(
''
)}
" validation=
{
"maxlength"
:
"12"
,
"data-bv-stringlength-message"
:
"文章作者在12个字符以内!"
}
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment