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
72a69964
"src/vscode:/vscode.git/clone" did not exist on "63ca1df46006446370c814ca4d9ab4d8a5398f59"
Commit
72a69964
authored
Apr 28, 2020
by
铭飞
Committed by
Gitee
Apr 28, 2020
Browse files
!228 修复bug
Merge pull request !228 from 灰色DT/5.0.1
parents
db98d5aa
0a2f344b
Changes
5
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
72a69964
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.2.2.RELEASE
</version>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-pom
</artifactId>
<version>
1.0.0
</version>
<relativePath/>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
net.mingsoft
</groupId>
<artifactId>
mcms
</artifactId>
<artifactId>
ms-
mcms
</artifactId>
<version>
5.0.0
</version>
<name>
ms-mcms
</name>
<properties>
<java.version>
1.8
</java.version>
</properties>
<repositories>
<repository>
<name>
${project.groupId}:${project.artifactId}
</name>
<description>
ms-mcms tools Library
</description>
<url>
https://github.com/ming-soft/ms-mcms
</url>
<licenses>
<license>
<name>
The MIT License (MIT)
</name>
<url>
http://mit-license.org
</url>
</license>
</licenses>
<developers>
<developer>
<name>
mingsoft develop group
</name>
<email>
service@mingsoft.net
</email>
<organization>
mingsoft
</organization>
<organizationUrl>
http://www.mingsoft.net
</organizationUrl>
</developer>
</developers>
<scm>
<connection>
scm:git://github.com/ming-soft/ms-mcms.git
</connection>
<developerConnection>
scm:git@github.com:ming-soft/ms-mcms.git
</developerConnection>
<url>
https://github.com/ming-soft/ms-mcms
</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>
sonatype-nexus-snapshots
</id>
<name>
Sonatype Nexus Snapshots
</name>
<url>
http://repo1.maven.org/maven2/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
<name>
Sonatype Nexus snapshot repository
</name>
<url>
https://oss.sonatype.org/content/repositories/snapshots
</url>
</snapshotRepository>
<repository>
<id>
sonatype
</id>
<name>
Sonatype Snapshots
</name>
<url>
https://oss.sonatype.org/content/groups/public/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
<id>
sonatype-nexus-staging
</id>
<name>
Sonatype Nexus release repository
</name>
<url>
https://oss.sonatype.org/service/local/staging/deploy/maven2/
</url>
</repository>
</repositories>
</distributionManagement>
<properties>
<java.version>
1.8
</java.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- 如果使用的是mysql8.0需要使用8.0的驱动 -->
<!-- <dependency>-->
<!-- <groupId>mysql</groupId>-->
<!-- <artifactId>mysql-connector-java</artifactId>-->
<!-- <version>8.0.11</version>-->
<!-- </dependency>-->
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mpeople
</artifactId>
<version>
1.0.18
</version>
</dependency>
<!-- 此部分是铭飞平台MStroe的客户端(MStore不在铭飞开源产品范围),如果不需要使用MStore可以删除掉 -->
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-basic
</artifactId>
<version>
1.0.23
</version>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-upgrader
</artifactId>
<version>
1.0.17
</version>
</dependency>
</dependencies>
<build>
<finalName>
ms-mcms
</finalName>
<resources>
<resource>
<directory>
src/main/java
</directory>
</resource>
<resource>
<directory>
src/main/webapp
</directory>
<excludes>
<exclude>
html/
</exclude>
<exclude>
static/
</exclude>
<exclude>
upload/
</exclude>
<exclude>
templets/
</exclude>
</excludes>
</resource>
<resource>
<directory>
src/main/resources
</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
2.6
</version>
<executions>
<execution>
<phase>
package
</phase>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<!--注意这玩意从编译结果目录开始算目录结构 -->
<exclude>
**/static/plugins/
</exclude>
<exclude>
**/static/skin/
</exclude>
<exclude>
**/application*.yml
</exclude>
<exclude>
**/Dockerfile
</exclude>
<exclude>
**/ehcache.xml
</exclude>
<exclude>
**/upgrade/
</exclude>
<exclude>
**/*.java
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-source-plugin
</artifactId>
<version>
2.2.1
</version>
<configuration>
<excludes>
<exclude>
**/static/plugins/
</exclude>
<exclude>
**/static/skin/
</exclude>
<exclude>
**/application*.yml
</exclude>
<exclude>
**/Dockerfile
</exclude>
<exclude>
**/ehcache.xml
</exclude>
<exclude>
**/upgrade/
</exclude>
<exclude>
**/config/
</exclude>
<exclude>
**/MSApplication.java
</exclude>
<exclude>
**/MSServletInitializer.java
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>
attach-sources
</id>
<goals>
<goal>
jar-no-fork
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
...
...
@@ -62,34 +149,148 @@
<configuration>
<source>
${java.version}
</source>
<target>
${java.version}
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
<showDeprecation>
true
</showDeprecation>
<showWarnings>
true
</showWarnings>
<compilerArguments>
<verbose
/>
<bootclasspath>
${java.home}/lib/rt.jar:${java.home}/lib/jce.jar
</bootclasspath>
</compilerArguments>
<compilerArgument>
-Xlint:unchecked
</compilerArgument>
</configuration>
<dependencies>
<dependency>
<groupId>
org.codehaus.plexus
</groupId>
<artifactId>
plexus-compiler-eclipse
</artifactId>
<version>
2.1
</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-eclipse-plugin
</artifactId>
<version>
2.8
</version>
<configuration>
<additionalConfig>
<file>
<name>
.settings/org.eclipse.core.resources.prefs
</name>
<content>
<![CDATA[
eclipse.preferences.version=1
encoding/<project>
=${project.build.sourceEncoding}
]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<configuration>
<argLine>
-Xmx256m
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>
com.atlassian.maven.plugins
</groupId>
<artifactId>
maven-clover2-plugin
</artifactId>
<version>
2.6.3
</version>
<configuration>
<licenseLocation>
${clover.license.file}
</licenseLocation>
<encoding>
${project.build.sourceEncoding}
</encoding>
<generateXml>
true
</generateXml>
</configuration>
</plugin>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
findbugs-maven-plugin
</artifactId>
<version>
1.2
</version>
<configuration>
<findbugsXmlOutput>
true
</findbugsXmlOutput>
<findbugsXmlWithMessages>
true
</findbugsXmlWithMessages>
<xmlOutput>
true
</xmlOutput>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-javadoc-plugin
</artifactId>
<version>
2.9.1
</version>
<configuration>
<charset>
UTF-8
</charset>
<encoding>
UTF-8
</encoding>
<docencoding>
UTF-8
</docencoding>
<javadocExecutable>
${java.home}/../bin/javadoc
</javadocExecutable>
<additionalparam>
-Xdoclint:none
</additionalparam>
</configuration>
<executions>
<execution>
<id>
attach-javadocs
</id>
<goals>
<goal>
repackage
</goal>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<version>
2.6
</version>
<configuration>
<fork>
true
</fork>
<webResources>
<resource>
<directory>
src/main/webapp/WEB-INF
</directory>
<targetPath>
WEB-INF
</targetPath>
<filtering>
true
</filtering>
<includes>
<include>
**/*.xml
</include>
</includes>
<excludes>
<exclude>
web.xml
</exclude>
</excludes>
</resource>
</webResources>
<attachClasses>
true
</attachClasses>
<warSourceExcludes>
*/web.xml,static
</warSourceExcludes>
<failOnMissingWebXml>
false
</failOnMissingWebXml>
<packagingExcludes>
ms.install,html/,static/,temp,upgrader,WEB-INF/web.xml,WEB-INF/lib/,templets/,upload/,WEB-INF/classes/*.xml,WEB-INF/classes/*.properties,*.sh,WEB-INF/classes/net/mingsoft/config/,WEB-INF/classes/net/mingsoft/*.class
</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-release-plugin
</artifactId>
<configuration>
<arguments>
-Dgpg.passphrase=${gpg.passphrase}
</arguments>
</configuration>
</plugin>
<plugin>
<groupId>
org.sonatype.plugins
</groupId>
<artifactId>
nexus-staging-maven-plugin
</artifactId>
<version>
1.6.7
</version>
<extensions>
true
</extensions>
<configuration>
<serverId>
sonatype-nexus-staging
</serverId>
<nexusUrl>
https://oss.sonatype.org/
</nexusUrl>
<autoReleaseAfterClose>
true
</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-gpg-plugin
</artifactId>
<version>
1.5
</version>
<executions>
<execution>
<id>
sign-artifacts
</id>
<phase>
verify
</phase>
<goals>
<goal>
sign
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>
src/main/webapp
</directory>
</resource>
<resource>
<directory>
src/main/resources
</directory>
</resource>
<resource>
<directory>
src/main/java
</directory>
</resource>
</resources>
<defaultGoal>
compile
</defaultGoal>
<finalName>
ms-mcms
</finalName>
</build>
</project>
\ No newline at end of file
</project>
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
();
...
...
@@ -88,4 +103,4 @@ public class ShiroConfig {
public
BaseAuthRealm
customRealm
()
{
return
new
BaseAuthRealm
();
}
}
\ No newline at end of file
}
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
\ No newline at end of file
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
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