wangtp пре 4 година
родитељ
комит
702d8d8583

+ 1 - 1
bin-xml

@@ -10,7 +10,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>net.mingsoft</groupId>
     <artifactId>ms-mcms</artifactId>
-    <version>5.1</version>
+    <version>5.2.0</version>
     <name>ms-mcms</name>
     <properties>
         <java.version>1.8</java.version>

BIN
doc/内容管理类图.asta


BIN
lib/DmJdbcDriver18.jar


+ 65 - 49
pom.xml

@@ -3,78 +3,109 @@
          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>net.mingsoft</groupId>
-        <artifactId>ms-pom</artifactId>
-        <version>2.0.4</version>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.2.RELEASE</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>net.mingsoft</groupId>
     <artifactId>ms-mcms</artifactId>
     <version>5.2.0.RELEASE</version>
     <name>ms-mcms</name>
-    <!-- 打包jar包 -->
-    <packaging>jar</packaging>
     <!-- 打包war包 -->
-    <!-- <packaging>war</packaging> -->
+<!--    <packaging>war</packaging>-->
     <properties>
         <java.version>1.8</java.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
-   <repositories>
-       <repository>
-           <id>central-repos</id>
-           <name>Central Repository 2</name>
-           <url>https://repo.maven.apache.org/maven2/</url>
-       </repository>
-       <!--阿里云仓库-->
-       <!--
-       <repository>
-           <id>alimaven</id>
-           <name>aliyun maven</name>
-           <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
-           <releases>
-               <enabled>true</enabled>
-           </releases>
-           <snapshots>
-               <enabled>true</enabled>
-           </snapshots>
-       </repository>
-       -->
-   </repositories>
+    <repositories>
+        <repository>
+            <id>central-repos</id>
+            <name>Central Repository 2</name>
+            <url>https://repo.maven.apache.org/maven2/</url>
+        </repository>
+        <!--阿里云仓库-->
+        <!--
+        <repository>
+            <id>alimaven</id>
+            <name>aliyun maven</name>
+            <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+        -->
+    </repositories>
     <dependencies>
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>ms-base</artifactId>
+            <version>1.0.25</version>
+
         </dependency>
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>ms-basic</artifactId>
+            <version>1.0.36</version>
+
         </dependency>
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>ms-mdiy</artifactId>
+            <version>1.0.28</version>
+
         </dependency>
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>ms-mpeople</artifactId>
+            <version>1.0.33</version>
+
         </dependency>
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>store-client</artifactId>
+            <version>5.2</version>
         </dependency>
-        <dependency>
-            <groupId>dm</groupId>
-            <artifactId>dm</artifactId>
-            <version>8</version>
-            <scope>system</scope>
-            <systemPath>${project.basedir}/lib/DmJdbcDriver18.jar</systemPath>
-        </dependency>
+
     </dependencies>
 
     <build>
         <finalName>ms-mcms</finalName>
+        <resources>
+            <resource>
+                <directory>src/main/webapp</directory>
+                <excludes>
+                    <!-- 打包生产并手动将static、html、upload、template复制到生产 -->
+                    <exclude>static/</exclude>
+                    <exclude>html/</exclude>
+                    <exclude>upload/</exclude>
+                    <exclude>template/</exclude>
+                    <!-- 如果生产需要实时修改WEB-INF/下的页面可,启用这行并手动将项目中的WEB-INF目录复制到运行环境 -->
+                    <!-- <exclude>WEB-INF/</exclude>-->
+                </excludes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <excludes>
+                    <exclude>**/*.java</exclude>
+                </excludes>
+            </resource>
+        </resources>
         <plugins>
             <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <executable>true</executable>
+                </configuration>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>3.1</version>
@@ -97,22 +128,7 @@
                     </dependency>
                 </dependencies>
             </plugin>
-
         </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/webapp</directory>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-            <resource>
-                <directory>src/main/java</directory>
-                <excludes>
-                    <exclude>**/*.java</exclude>
-                </excludes>
-            </resource>
-        </resources>
         <defaultGoal>compile</defaultGoal>
     </build>
 </project>

+ 3 - 3
src/main/java/net/mingsoft/config/WebConfig.java

@@ -86,8 +86,8 @@ public class WebConfig implements WebMvcConfigurer {
 
 	@Override
 	public void addResourceHandlers(ResourceHandlerRegistry registry) {
-		registry.addResourceHandler(uploadMapping).addResourceLocations(File.separator+uploadFloderPath+File.separator,"file:"+uploadFloderPath+File.separator);
-		registry.addResourceHandler("/template/**").addResourceLocations(File.separator+template+File.separator,"file:"+template+File.separator);
+		registry.addResourceHandler(uploadMapping).addResourceLocations(File.separator+uploadFloderPath+File.separator,"file:"+uploadFloderPath+File.separator,"classpath:/template/");
+		registry.addResourceHandler("/template/**").addResourceLocations(File.separator+template+File.separator,"file:"+template+File.separator,"classpath:/html/");
 		registry.addResourceHandler("/html/**").addResourceLocations("/html/","file:html/");
 		//三种映射方式 webapp下、当前目录下、jar内
 		registry.addResourceHandler("/app/**").addResourceLocations("/app/","file:app/", "classpath:/app/");
@@ -137,7 +137,7 @@ public class WebConfig implements WebMvcConfigurer {
 	 */
 	@Override
 	public void addViewControllers(ViewControllerRegistry registry) {
-		registry.addViewController("/").setViewName("forward:/index");
+		registry.addViewController("/").setViewName("forward:/index.do");
 		registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
 		WebMvcConfigurer.super.addViewControllers(registry);
 	}

+ 1 - 1
src/main/resources/application.yml

@@ -20,7 +20,7 @@ ms:
   manager:
     path: /ms #后台访问的路径,如:http://项目/ms/login.do,生产的时候建议修改
     view-path: /WEB-INF/manager #后台视图层路径配置
-    check-code: false #默认开启验证码验证,false验证码不验证
+    check-code: true #默认开启验证码验证,false验证码不验证
 
   upload:
     enable-web: true  #启用web层的上传

+ 1 - 1
src/main/webapp/template/1/default/about.htm

@@ -42,7 +42,7 @@
       <span class="title"> ${field.typetitle} </span>
       {/ms:channel}
       <#assign typetitle=field.typetitle>
-      <#if field.leaf>
+      <#if field.typeleaf>
       {ms:channel type='level'}
       <a href="{ms:global.url/}${field.typelink}" class="<#if typetitle==field.typetitle>sub-title-sel<#else>sub-title</#if>"> ${field.typetitle} </a>
       {/ms:channel}

+ 0 - 1
src/main/webapp/template/1/default/css/app.css

@@ -605,7 +605,6 @@
 
     .ms-nav .body .nav-search .ms-search-input .ms-search-button {
         flex-direction: row;
-        background-image: url({ms:global.host/}/{ms:global.style/}/images/1601265263422.png);
         display: flex;
         width: 40px;
         box-sizing: border-box;

+ 1 - 1
src/main/webapp/template/1/default/nav.htm

@@ -2,7 +2,7 @@
 <#assign typeid=field.typeid>
 <div class="ms-nav">
  <div class="body"> 
-  <div class="logo"> 
+  <div class="logo">
    <img title="" alt="" src="{ms:global.host/}/{@ms:file global.logo/}" class="logo-pic">
    <img title="" alt="" src="https://www.mingsoft.net//template/1/ms/images/1596437934982.png" class="logo-desc"> 
   </div> 

+ 1 - 1
src/main/webapp/template/1/default/news-detail.htm

@@ -43,7 +43,7 @@
       <span class="title"> ${field.typetitle} </span>
       {/ms:channel}
       <#assign typetitle=field.typetitle>
-      <#if field.leaf>
+      <#if field.typeleaf>
       {ms:channel type='level'}
       <a href="{ms:global.url/}${field.typelink}" class="<#if typetitle==field.typetitle>sub-title-sel<#else>sub-title</#if>"> ${field.typetitle} </a>
       {/ms:channel}

+ 1 - 1
src/main/webapp/template/1/default/news-list.htm

@@ -42,7 +42,7 @@
      <span class="title"> ${field.typetitle}</span>
      {/ms:channel}
      <#assign typetitle=field.typetitle>
-     <#if field.leaf>
+     <#if field.typeleaf>
      {ms:channel type='level'}
      <a href="{ms:global.url/}${field.typelink}" class="<#if typetitle==field.typetitle>sub-title-sel<#else>sub-title</#if>"> ${field.typetitle} </a>
      {/ms:channel}

+ 1 - 1
src/main/webapp/template/1/default/product-detail.htm

@@ -42,7 +42,7 @@
       <span class="title"> ${field.typetitle} </span>
       {/ms:channel}
       <#assign typetitle=field.typetitle>
-      <#if field.leaf>
+      <#if field.typeleaf>
       {ms:channel type='level'}
       <a href="{ms:global.url/}${field.typelink}" class="<#if typetitle==field.typetitle>sub-title-sel<#else>sub-title</#if>"> ${field.typetitle} </a>
       {/ms:channel}

+ 1 - 1
src/main/webapp/template/1/default/product-list.htm

@@ -43,7 +43,7 @@
       <span class="title"> ${field.typetitle} </span>
       {/ms:channel}
       <#assign typetitle=field.typetitle>
-      <#if field.leaf>
+      <#if field.typeleaf>
       {ms:channel type='level'}
       <a href="{ms:global.url/}${field.typelink}" class="<#if typetitle==field.typetitle>sub-title-sel<#else>sub-title</#if>"> ${field.typetitle} </a>
       {/ms:channel}