Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
72a69964
Commit
72a69964
authored
Apr 28, 2020
by
铭飞
Committed by
Gitee
Apr 28, 2020
Browse files
Options
Browse Files
Download
Plain Diff
!228 修复bug
Merge pull request !228 from 灰色DT/5.0.1
parents
db98d5aa
0a2f344b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
3 deletions
+20
-3
pom.xml
pom.xml
+0
-0
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+3
-1
ShiroConfig.java
src/main/java/net/mingsoft/config/ShiroConfig.java
+15
-0
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+1
-1
No files found.
pom.xml
View file @
72a69964
This diff is collapsed.
Click to expand it.
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
72a69964
...
...
@@ -139,6 +139,7 @@ public class CmsParserUtil extends ParserUtil {
if
(
ParserUtil
.
hasMobileFile
(
column
.
getCategoryListUrl
()))
{
writer
=
new
StringWriter
();
mobileTemplate
.
process
(
null
,
writer
);
parserParams
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
// 将tag.getContent()写入路径
FileUtil
.
writeString
(
tag
.
rendering
(),
mobilePath
,
Const
.
UTF8
);
...
...
@@ -170,6 +171,7 @@ public class CmsParserUtil extends ParserUtil {
if
(
ParserUtil
.
hasMobileFile
(
column
.
getCategoryListUrl
()))
{
writer
=
new
StringWriter
();
mobileTemplate
.
process
(
null
,
writer
);
parserParams
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
// 将tag.getContent()写入路径
FileUtil
.
writeString
(
tag
.
rendering
(),
mobilePath
,
Const
.
UTF8
);
...
...
@@ -227,7 +229,7 @@ public class CmsParserUtil extends ParserUtil {
}
// 判断文件是否存在,若不存在弹出返回信息
if
(!
FileUtil
.
exist
(
ParserUtil
.
buildTempletPath
(
columnUrl
))||
StringUtils
.
isBlank
(
articleIdList
.
get
(
artId
).
getCategoryId
())
||
articleIdList
.
get
(
artId
).
getCategoryType
()==
null
)
{
if
(!
FileUtil
.
exist
(
ParserUtil
.
buildTempletPath
(
columnUrl
))||
articleIdList
.
get
(
artId
).
getCategoryId
()==
null
||
articleIdList
.
get
(
artId
).
getCategoryType
()==
null
)
{
artId
++;
continue
;
}
...
...
src/main/java/net/mingsoft/config/ShiroConfig.java
View file @
72a69964
...
...
@@ -42,6 +42,21 @@ public class ShiroConfig {
return
authorizationAttributeSourceAdvisor
;
}
@Bean
public
AuthorizationAttributeSourceAdvisor
getAuthorizationAttributeSourceAdvisor
(
DefaultWebSecurityManager
securityManager
)
{
AuthorizationAttributeSourceAdvisor
advisor
=
new
AuthorizationAttributeSourceAdvisor
();
advisor
.
setSecurityManager
(
securityManager
);
return
advisor
;
}
@Bean
public
DefaultAdvisorAutoProxyCreator
getDefaultAdvisorAutoProxyCreator
()
{
DefaultAdvisorAutoProxyCreator
autoProxyCreator
=
new
DefaultAdvisorAutoProxyCreator
();
autoProxyCreator
.
setProxyTargetClass
(
true
);
return
autoProxyCreator
;
}
@Bean
public
ShiroFilterFactoryBean
shirFilter
(
SecurityManager
securityManager
)
{
ShiroFilterFactoryBean
shiroFilterFactoryBean
=
new
ShiroFilterFactoryBean
();
...
...
src/main/resources/application-dev.yml
View file @
72a69964
...
...
@@ -2,6 +2,6 @@ spring:
datasource
:
url
:
jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username
:
root
password
:
root
password
:
123456
filters
:
wall,mergeStat
type
:
com.alibaba.druid.pool.DruidDataSource
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
72a69964
...
...
@@ -479,7 +479,7 @@
"id"
:
id
}).
then
(
function
(
res
)
{
if
(
res
.
result
&&
res
.
data
)
{
if
(
res
.
data
.
contentType
)
{
if
(
res
.
data
.
contentType
&&
res
.
data
.
contentType
!=
''
)
{
res
.
data
.
contentType
=
res
.
data
.
contentType
.
split
(
','
);
}
else
{
res
.
data
.
contentType
=
[];
...
...
Write
Preview
Markdown
is supported
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