diff --git a/pom.xml b/pom.xml index fbdfee43..eda7ff65 100644 --- a/pom.xml +++ b/pom.xml @@ -1,60 +1,147 @@ - + - org.springframework.boot - spring-boot-starter-parent - 2.2.2.RELEASE + net.mingsoft + ms-pom + 1.0.0 + - 4.0.0 + 4.0.0 net.mingsoft - mcms + ms-mcms 5.0.0 - ms-mcms + ${project.groupId}:${project.artifactId} + ms-mcms tools Library + https://github.com/ming-soft/ms-mcms + + + The MIT License (MIT) + http://mit-license.org + + + + + mingsoft develop group + service@mingsoft.net + mingsoft + http://www.mingsoft.net + + + + + scm:git://github.com/ming-soft/ms-mcms.git + scm:git@github.com:ming-soft/ms-mcms.git + https://github.com/ming-soft/ms-mcms + + + + sonatype-nexus-snapshots + Sonatype Nexus snapshot repository + https://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + Sonatype Nexus release repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + 1.8 + UTF-8 - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - http://repo1.maven.org/maven2/ - - true - - - true - - - - sonatype - Sonatype Snapshots - https://oss.sonatype.org/content/groups/public/ - - true - - - true - - - + + + + + + net.mingsoft ms-mpeople - 1.0.18 - + + net.mingsoft + ms-basic + 1.0.23 + net.mingsoft ms-upgrader - 1.0.17 - ms-mcms + + + src/main/java + + + src/main/webapp + + html/ + static/ + upload/ + templets/ + + + + src/main/resources + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + package + + jar + + + + + + + **/static/plugins/ + **/static/skin/ + **/application*.yml + **/Dockerfile + **/ehcache.xml + **/upgrade/ + **/*.java + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + **/static/plugins/ + **/static/skin/ + **/application*.yml + **/Dockerfile + **/ehcache.xml + **/upgrade/ + **/config/ + **/MSApplication.java + **/MSServletInitializer.java + + + + + attach-sources + + jar-no-fork + + + + org.apache.maven.plugins maven-compiler-plugin @@ -62,34 +149,148 @@ ${java.version} ${java.version} + ${project.build.sourceEncoding} + true + true + + + ${java.home}/lib/rt.jar:${java.home}/lib/jce.jar + + -Xlint:unchecked + + + + org.codehaus.plexus + plexus-compiler-eclipse + 2.1 + + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.8 + + + + .settings/org.eclipse.core.resources.prefs + + =${project.build.sourceEncoding} + ]]> + + + + + + + + maven-surefire-plugin + + -Xmx256m - org.springframework.boot - spring-boot-maven-plugin + com.atlassian.maven.plugins + maven-clover2-plugin + 2.6.3 + + ${clover.license.file} + ${project.build.sourceEncoding} + true + + + + org.codehaus.mojo + findbugs-maven-plugin + 1.2 + + true + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + UTF-8 + UTF-8 + UTF-8 + ${java.home}/../bin/javadoc + -Xdoclint:none + + attach-javadocs - repackage + jar + + + org.apache.maven.plugins + maven-war-plugin + 2.6 - true + + + src/main/webapp/WEB-INF + WEB-INF + true + + **/*.xml + + + web.xml + + + + true + */web.xml,static + false + 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 + + org.apache.maven.plugins + maven-release-plugin + + -Dgpg.passphrase=${gpg.passphrase} + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + sonatype-nexus-staging + https://oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + - - - src/main/webapp - - - src/main/resources - - - src/main/java - - compile + + ms-mcms - \ No newline at end of file + diff --git a/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java b/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java index 2bf1db84..d9046e11 100644 --- a/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java +++ b/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java @@ -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; } diff --git a/src/main/java/net/mingsoft/config/ShiroConfig.java b/src/main/java/net/mingsoft/config/ShiroConfig.java index 9df316e3..a580427d 100644 --- a/src/main/java/net/mingsoft/config/ShiroConfig.java +++ b/src/main/java/net/mingsoft/config/ShiroConfig.java @@ -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 +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 5e9db851..a0ff7fc0 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -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 diff --git a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl index f3fc1dcb..083d6b59 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl @@ -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 = [];