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
ef542c34
Commit
ef542c34
authored
Apr 28, 2020
by
信 赵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
97565180
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
3 deletions
+47
-3
pom.xml
pom.xml
+5
-0
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+3
-1
ShiroConfig.java
src/main/java/net/mingsoft/config/ShiroConfig.java
+17
-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
polyfill.min.js
...ebapp/static/plugins/babel-polyfill/7.8.3/polyfill.min.js
+0
-0
compatible.js
src/main/webapp/static/plugins/ms/1.0.0/compatible.js
+20
-0
No files found.
pom.xml
View file @
ef542c34
...
@@ -62,6 +62,11 @@
...
@@ -62,6 +62,11 @@
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mpeople
</artifactId>
<artifactId>
ms-mpeople
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-basic
</artifactId>
<version>
1.0.23
</version>
</dependency>
<dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-upgrader
</artifactId>
<artifactId>
ms-upgrader
</artifactId>
...
...
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
ef542c34
...
@@ -139,6 +139,7 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -139,6 +139,7 @@ public class CmsParserUtil extends ParserUtil {
if
(
ParserUtil
.
hasMobileFile
(
column
.
getCategoryListUrl
()))
{
if
(
ParserUtil
.
hasMobileFile
(
column
.
getCategoryListUrl
()))
{
writer
=
new
StringWriter
();
writer
=
new
StringWriter
();
mobileTemplate
.
process
(
null
,
writer
);
mobileTemplate
.
process
(
null
,
writer
);
parserParams
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
// 将tag.getContent()写入路径
// 将tag.getContent()写入路径
FileUtil
.
writeString
(
tag
.
rendering
(),
mobilePath
,
Const
.
UTF8
);
FileUtil
.
writeString
(
tag
.
rendering
(),
mobilePath
,
Const
.
UTF8
);
...
@@ -170,6 +171,7 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -170,6 +171,7 @@ public class CmsParserUtil extends ParserUtil {
if
(
ParserUtil
.
hasMobileFile
(
column
.
getCategoryListUrl
()))
{
if
(
ParserUtil
.
hasMobileFile
(
column
.
getCategoryListUrl
()))
{
writer
=
new
StringWriter
();
writer
=
new
StringWriter
();
mobileTemplate
.
process
(
null
,
writer
);
mobileTemplate
.
process
(
null
,
writer
);
parserParams
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
// 将tag.getContent()写入路径
// 将tag.getContent()写入路径
FileUtil
.
writeString
(
tag
.
rendering
(),
mobilePath
,
Const
.
UTF8
);
FileUtil
.
writeString
(
tag
.
rendering
(),
mobilePath
,
Const
.
UTF8
);
...
@@ -227,7 +229,7 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -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
++;
artId
++;
continue
;
continue
;
}
}
...
...
src/main/java/net/mingsoft/config/ShiroConfig.java
View file @
ef542c34
...
@@ -4,8 +4,10 @@ import java.util.LinkedHashMap;
...
@@ -4,8 +4,10 @@ import java.util.LinkedHashMap;
import
java.util.Map
;
import
java.util.Map
;
import
org.apache.shiro.mgt.SecurityManager
;
import
org.apache.shiro.mgt.SecurityManager
;
import
org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor
;
import
org.apache.shiro.spring.web.ShiroFilterFactoryBean
;
import
org.apache.shiro.spring.web.ShiroFilterFactoryBean
;
import
org.apache.shiro.web.mgt.DefaultWebSecurityManager
;
import
org.apache.shiro.web.mgt.DefaultWebSecurityManager
;
import
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
...
@@ -19,6 +21,21 @@ public class ShiroConfig {
...
@@ -19,6 +21,21 @@ public class ShiroConfig {
@Value
(
"${ms.manager.path}"
)
@Value
(
"${ms.manager.path}"
)
private
String
managerPath
;
private
String
managerPath
;
@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
@Bean
public
ShiroFilterFactoryBean
shirFilter
(
SecurityManager
securityManager
)
{
public
ShiroFilterFactoryBean
shirFilter
(
SecurityManager
securityManager
)
{
ShiroFilterFactoryBean
shiroFilterFactoryBean
=
new
ShiroFilterFactoryBean
();
ShiroFilterFactoryBean
shiroFilterFactoryBean
=
new
ShiroFilterFactoryBean
();
...
...
src/main/resources/application-dev.yml
View file @
ef542c34
...
@@ -2,6 +2,6 @@ spring:
...
@@ -2,6 +2,6 @@ spring:
datasource
:
datasource
:
url
:
jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
url
:
jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username
:
root
username
:
root
password
:
root
password
:
123456
filters
:
wall,mergeStat
filters
:
wall,mergeStat
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
ef542c34
...
@@ -445,7 +445,7 @@
...
@@ -445,7 +445,7 @@
var
that
=
this
;
var
that
=
this
;
ms
.
http
.
get
(
ms
.
manager
+
"/cms/content/get.do"
,
{
"id"
:
id
}).
then
(
function
(
res
)
{
ms
.
http
.
get
(
ms
.
manager
+
"/cms/content/get.do"
,
{
"id"
:
id
}).
then
(
function
(
res
)
{
if
(
res
.
result
&&
res
.
data
)
{
if
(
res
.
result
&&
res
.
data
)
{
if
(
res
.
data
.
contentType
)
{
if
(
res
.
data
.
contentType
&&
res
.
data
.
contentType
!=
''
)
{
res
.
data
.
contentType
=
res
.
data
.
contentType
.
split
(
','
);
res
.
data
.
contentType
=
res
.
data
.
contentType
.
split
(
','
);
}
}
else
{
else
{
...
...
src/main/webapp/static/plugins/babel-polyfill/7.8.3/polyfill.min.js
0 → 100644
View file @
ef542c34
This diff is collapsed.
Click to expand it.
src/main/webapp/static/plugins/ms/1.0.0/compatible.js
0 → 100644
View file @
ef542c34
if
(
typeof
Object
.
assign
!=
'function'
)
{
Object
.
assign
=
function
(
target
)
{
'use strict'
;
if
(
target
==
null
)
{
throw
new
TypeError
(
'Cannot convert undefined or null to object'
);
}
target
=
Object
(
target
);
for
(
var
index
=
1
;
index
<
arguments
.
length
;
index
++
)
{
var
source
=
arguments
[
index
];
if
(
source
!=
null
)
{
for
(
var
key
in
source
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
source
,
key
))
{
target
[
key
]
=
source
[
key
];
}
}
}
}
return
target
;
};
}
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