Commit db3015e7 authored by ms-dev's avatar ms-dev

配置更新

parent 3dc5625a
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -31,12 +31,7 @@
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mdiy</artifactId>
<version>1.0.7-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mdiy</artifactId>
......@@ -44,12 +39,6 @@
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId>
<version>1.0.7-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId>
......@@ -120,7 +109,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<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</packagingExcludes>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin><!-- 打包成war使用 -->
......
package net.mingsoft;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import net.mingsoft.basic.action.BaseAction;
@Controller
@RequestMapping("/")
public class Test {
/**
* 加载管理员登录界面
*
* @param request
* 请求对象
* @return 管理员登录界面地址
*/
@SuppressWarnings("resource")
@RequestMapping("/a")
public String login(HttpServletRequest request) {
return "/login";
}
}
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/db-mcms-4-6-1?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
url: jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
password: root
filters: wall,mergeStat
......
This diff is collapsed.
<@ms.html5>
<@ms.nav title="文章列表"></@ms.nav>
<@ms.searchForm name="searchForm" action="">
<#if articleTypeList?has_content>
<@ms.select label="文章属性" default="全部" value="a" name="articleType" id="forumSelect" list=articleTypeList listValue="dictLabel" listKey="dictValue" value="${articleType?default('')}"/>
<#else>
<@ms.select label="文章属性" name="articleType" id="forumSelect" value="" list=["默认属性"] />
</#if>
<@ms.text label="文章标题" name="basicTitle" value="" title="请输入文章标题" placeholder="请输入文章标题" />
<@ms.searchFormButton>
<@ms.queryButton id="submitSearch" />
</@ms.searchFormButton>
</@ms.searchForm>
<div id="toolbar">
<@ms.panelNavBtnGroup>
<@shiro.hasPermission name="article:save"><@ms.panelNavBtnAdd title=""/></@shiro.hasPermission>
<@shiro.hasPermission name="article:del"><@ms.panelNavBtnDel title=""/></@shiro.hasPermission>
</@ms.panelNavBtnGroup>
</div>
<@ms.panel>
<table id="articleListTable"
data-show-refresh="true"
data-show-columns="true"
data-show-export="true"
data-method="post"
data-detail-formatter="detailFormatter"
data-pagination="true"
data-page-size="10"
data-side-pagination="server">
</table>
</@ms.panel>
</@ms.html5>
<!--删除限时文章-->
<@ms.modal modalName="delete" title="删除文章">
<@ms.modalBody>
确定要删除所选的文章吗?
</@ms.modalBody>
<@ms.modalButton>
<@ms.button class="btn btn-danger rightDelete" value="确定"/>
</@ms.modalButton>
</@ms.modal>
<script>
$(function(){
var search = $("form[name='searchForm']").serializeJSON();
var articleType = search.articleType;
$("#articleListTable").bootstrapTable({
url:"${managerPath}/cms/article/${categoryId}/list.do?articleTypeStr="+articleType,
contentType : "application/x-www-form-urlencoded",
queryParamsType : "undefined",
toolbar: "#toolbar",
columns: [{ checkbox: true}, {
field: 'column.categoryTitle',
title: '栏目名',
width: 90,
align: 'left'
},{
field: 'basicTitle',
title: '文章标题',
formatter: function (value, row, index){
<@shiro.hasPermission name="article:update">
var url='${managerPath}/cms/article/'+row.articleID+"/edit.do";
return "<a href="+url+" target='_self' >"+value+"</a>";
</@shiro.hasPermission>
<@shiro.lacksPermission name="article:update">
return value;
</@shiro.lacksPermission>
}
}, {
field: 'articleAuthor',
title: '作者',
width: 100
}, {
field: 'basicSort',
title: '排序',
align: 'center',
width: 50
}, {
field: 'basicHit',
title: '点击',
align: 'center',
width: 50
}, {
field: 'basicDateTime',
title: '发布时间',
align: 'center',
width: 90
}]
});
//查询文章标题
$("#submitSearch").click(function(){
var search = $("form[name='searchForm']").serializeJSON();
var params = $('#articleListTable').bootstrapTable('getOptions');
params.queryParams = function(params) {
$.extend(params,search);
return params;
}
$("#articleListTable").bootstrapTable('refresh', {query:$("form[name='searchForm']").serializeJSON()});
});
//添加文章
$("#addButton").click(function(){
if(${isParent}==true){
<@ms.notify msg="不能选择父级栏目" />
return false;
}
location.href = "${managerPath}/cms/article/add.do?categoryId=${categoryId?default(0)}&modelId=${Session.model_id_session?default(0)}&categoryTitle=${categoryTitle?default('')}";
});
//点击重置按钮
$(".reset").click(function(){
$("input[name=basicTitle]").val("");
})
//多选删除
$("#delButton").click(function(){
//获取勾选的所在行的所有数据
var rows = $("#articleListTable").bootstrapTable("getSelections");
if(rows!=""){
//弹出modal窗体
$(".delete").modal();
}else{
<@ms.notify msg="请选择文章!" type="warning"/>
}
});
//删除多个文章
$(".rightDelete").click(function(){
var rows = $("#articleListTable").bootstrapTable("getSelections");
if(rows!=""){
$.ajax({
url:"${managerPath}/cms/article/delete.do",
type:'post',
dataType:'json',
data:JSON.stringify(rows),
contentType:'application/json',
success:function(msg) {
if (msg.result) {
<@ms.notify msg="删除成功!" type="success"/>
location.reload();
} else {
<@ms.notify msg="删除失败" type="fail"/>
}
}
});
}else{
<@ms.notify msg="请选择文章!" type="warning"/>
}
});
});
</script>
<!DOCTYPE html>
<html lang="zh">
<head>
<#include "/include/macro.ftl"/>
<#include "/include/meta.ftl"/>
</head>
<body class="over-hide">
<@ms.content>
<@ms.contentMenu>
<!-- 树形模块菜单开始 -->
<#if listColumn?has_content>
<@ms.tree treeId="inputTree" json="${listColumn?default('')}" addNodesName="全部" jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle" showIcon="true" expandAll="true" getZtreeId="getZtreeId(event,treeId,treeNode);" />
<#else>
<@ms.nodata content="暂无栏目"/>
</#if>
<!-- 树形模块菜单结束 -->
</@ms.contentMenu>
<@ms.contentBody width="85%" style="overflow-y: hidden;">
<@ms.contentPanel style="margin:0;padding:0;overflow-y: hidden;">
<iframe src="${managerPath}/cms/article/0/main.do" style="width:100%;maring:0;padding:0;border:none;height:100%;background-image: url(${skin_manager_loadding}); background-repeat: no-repeat; background-position: center;" id="listFrame" target="listFrame" ></iframe>
</@ms.contentPanel>
</@ms.contentBody>
</@ms.content>
<script>
//树形结点
function getZtreeId(event,treeId,treeNode){
if (treeNode.columnType==1) {
//父级栏目为true,子级栏目为false
var isParent = false;
if(treeNode.isParent == true){
isParent = true;
}
$("#listFrame").attr("src","${managerPath}/cms/article/"+treeNode.categoryId+"/main.do?isParent="+isParent+"&categoryTitle="+encodeURIComponent(treeNode.categoryTitle));
} else if(treeNode.columnType==2){
//判断该单篇栏目是否存在文章
$.ajax({
type: "POST",
url: "${managerPath}/cms/article/"+treeNode.categoryId+"/queryColumnArticle.do",
dataType:"json",
success: function(msg){
if (msg.result) {
$("#listFrame").attr("src","${managerPath}/cms/article/add.do?categoryId="+treeNode.categoryId+"&categoryTitle="+encodeURIComponent(treeNode.categoryTitle));
} else {
//如果该单篇栏目下存在文章则跳转到文章编辑页
$("#listFrame").attr("src","${managerPath}/cms/article/"+treeNode.categoryId+"/edit.do?categoryId="+treeNode.categoryId+"&categoryTitle="+encodeURIComponent(treeNode.categoryTitle));
}
},
});
} else if(treeNode.columnType=="" || treeNode.columnType == undefined){
$("#listFrame").attr("src","${managerPath}/cms/article/0/main.do");
}
}
</script>
</body>
</html>
\ No newline at end of file
<@shiro.hasPermission name="cms:column:save"><@ms.addButton id="addColumnBtn"/></@shiro.hasPermission>
<@shiro.hasPermission name="cms:column:del"><@ms.delButton id="delColumnBtn"/></@shiro.hasPermission>
\ No newline at end of file
<@shiro.hasPermission name="cms:column:update">
var url = "${managerPath}/${model?default("")}/column/"+row.categoryId+"/edit.do?modelId=${Session.model_id_session?default(0)}&modelTitle=${Session.model_title_session?default('')}";
return "<a href=" +url+ " target='_self'>" + value + "</a>";
</@shiro.hasPermission>
<@shiro.lacksPermission name="cms:column:update">
return value;
</@shiro.lacksPermission>
\ No newline at end of file
<@ms.html5>
<@ms.nav title="静态化"></@ms.nav>
<@ms.panel>
<p class="alert alert-info" role="alert">
<span class="glyphicon glyphicon-pushpin text-lef "></span>
<a class="alert-link text-lef" style="margin-left: 12px;">
更新主页,如果系统存在引导页面可以手动修改主页位置文件名,default.html引导页面index.html主页。
</a><br/>
<span class="glyphicon glyphicon-pushpin text-lef "></span>
<a class="alert-link text-lef" style="margin-left: 12px;">
更新栏目列表,推荐使用指定栏目更新。系统提示“更新中...”请不要刷新页面或点击其他菜单。
</a><br/>
<span class="glyphicon glyphicon-pushpin text-lef "></span>
<a class="alert-link text-lef" style="margin-left: 12px;">
根据时间与栏目类型生成文章
</a>
</p>
<@ms.form name="generateIndex">
<@ms.formRow label="选择主页模板" width="300">
<select class="form-control" id="select_id"></select>
<input type="hidden" name="url"/>
</@ms.formRow>
<@ms.text id="position" label="选择主页位置 " width="300" value="index" placeholder="输入主页位置" name="position" help="注:主页位置htm文件名一般为index.html或default.html"/>
<div class="form-group ms-form-group"><div class="col-sm-2"></div><div class="col-sm-9 ms-from-group-input ms-form-input">
<@shiro.hasPermission name="cms:generate:index">
<@ms.button class="btn btn-primary" id="updateIndex" value="生成主页" />
<@ms.panelNavBtnSave title="" id="viewIndex" value="预览主页" />
</@shiro.hasPermission>
</div>
</div>
</@ms.form>
<!--选择更新的栏目-->
<@ms.form name="generateColumn">
<@ms.formRow label="选择要生成栏目" width="300">
<#if list?has_content>
<@ms.treeInput treeId="inputTree" json="${list?default('')}" jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle" buttonText="选择更新的栏目" addNodesName="所有栏目" inputName="columnId" showIcon="true" expandAll="true" />
<#else>
<@ms.treeInput treeId="errorTree" buttonText="暂无数据" />
</#if>
</@ms.formRow>
<div class="form-group ms-form-group"><div class="col-sm-2"></div><div class="col-sm-9 ms-from-group-input ms-form-input">
<@shiro.hasPermission name="cms:generate:column">
<@ms.button class="btn btn-primary" id="updateColumn" value="生成栏目" />
</@shiro.hasPermission>
</div></div>
</@ms.form>
<@ms.form name="generateArticle">
<@ms.formRow label="文章栏目" width="300">
<#if list?has_content>
<@ms.treeInput treeId="inputTreee" json="${list?default('')}" jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle" addNodesName="所有栏目" buttonText="选择更新的栏目" inputName="articleId" showIcon="true" expandAll="true" />
<#else>
<@ms.treeInput treeId="errorTree" buttonText="暂无数据" />
</#if>
</@ms.formRow>
<@ms.date name="dateTime" label="指定时间" single=true readonly="readonly" width="300" value="${now?string('yyyy-MM-dd')}" validation={"required":"true", "data-bv-notempty-message":"必填项目"} placeholder="点击该框选择时间段" />
<div class="form-group ms-form-group"><div class="col-sm-2"></div><div class="col-sm-9 ms-from-group-input ms-form-input">
<@shiro.hasPermission name="cms:generate:article">
<@ms.button class="btn btn-primary" id="updateArticle" value="生成文章" />
</@shiro.hasPermission>
</div></div>
</@ms.form>
</@ms.panel>
</@ms.html5>
<!--点击进行按钮提交-->
<script>
$(function(){
var URL="${managerPath}/template/queryTemplateFileForColumn.do";
var DATA = "";
$(this).request({url:URL,data:DATA,type:"json",method:"get",func:function(msg) {
if(msg.length==0){
$("#select_id").append("<option value='' >暂无文件</option>")
}
for(var i = 0;i<msg.length;i++){
$("#select_id").append("<option value="+msg[i]+">"+msg[i]+"</option>");
//如果存在index.html
if(msg[i]=="index.html" || msg[i]=="index.htm"){
$("#select_id").find("option[value='"+msg[i]+"']").attr("selected",true);
}
}
}});
})
//点击一键更新主页时,进行主页更新
$("#updateIndex").click(function(){
//选择的主页模板名称和主页位置
var url = $("#select_id").val();
var position =$("input[name='position']").val();
//封装ajax请求参数
var URL="${managerPath}/cms/generate//generateIndex.do";
var DATA = "url="+url+"&position="+position;
$(this).html("更新中..").attr("disabled", "disabled");
$(this).request({url:URL,data:DATA,type:"json",method:"post",func:function(msg) {
$("#updateIndex").html("更新主页").removeAttr("disabled");
if(msg.result){
<@ms.notify msg="更新成功" type="success"/>
}else{
$('.ms-notifications').offset({top:43}).notify({
type:'warning',
message: { text:msg.resultMsg }
}).show();
}
$("#updateIndex").html("更新主页")
}});
});
//点击预览时,进行预览
$("#viewIndex").click(function(){
var position =$("input[name='position']").val();
window.open("${managerPath}/cms/generate/"+position+"/viewIndex.do");
});
</script>
<!--点击生成栏目按钮-->
<script>
$("#updateColumn").click(function() {
var columnId = 0;
if($("input[name='columnId']").val() !="" && $("input[name='columnId']").val().length>0){
columnId = $("input[name='columnId']").val();
}
var URL="${managerPath}/cms/generate/"+columnId+"/genernateColumn.do";
$(this).html("更新中..").attr("disabled", "disabled");
$(this).request({url:URL,data:columnId,type:"json",method:"post",func:function(msg) {
$("#updateColumn").html("更新栏目").removeAttr("disabled");
//回调处理方式
if(msg.result){
<@ms.notify msg="更新成功" type="success"/>
}else{
$('.ms-notifications').offset({top:43}).notify({
type:'warning',
message: { text:msg.resultMsg }
}).show();
}
}});
});
</script>
<!--点击生成文章按钮-->
<script>
$("#updateArticle").click(function() {
var articleId = 0;
if($("input[name='articleId']").val() !="" ){
articleId = $("input[name='articleId']").val();
}
var URL="${managerPath}/cms/generate/" + articleId + "/generateArticle.do";
var DATA = "dateTime=" + $("input[name='dateTime']").val();
$(this).html("更新中..").attr("disabled", "disabled");
$(this).request({url:URL,data:DATA,type:"json",method:"post",func:function(msg) {
$("#updateArticle").html("更新文档").removeAttr("disabled");
//回调处理方式
if(msg.result){
<@ms.notify msg="更新成功" type="success"/>
}else{
$('.ms-notifications').offset({top:43}).notify({
type:'warning',
message: { text:msg.resultMsg }
}).show();
}
}});
});
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<title>铭飞CMS</title>
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style>
body{ height: 100%;}
</style>
</head>
<body>
<div style="
text-align: center;
color: #555;
background: #FCFCFC;
height: 300px;
padding-top: 200px;
vertical-align: middle;
"><h2>欢迎进入MS系统</h2><p>欢迎加群: ①231212174 ②221335098 或到<a href="http://ms.mingsoft.net/mbbs/main.do" target="_blank" style="
text-decoration: none;
">官方论坛进行技术交流</a></p></div>
</body>
</html>
\ No newline at end of file
1
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>mybatis</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-core.xml</param-value>
</context-param>
<filter>
<description>字符集过滤器</description>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<description>字符集编码</description>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Apache Shiro -->
<filter>
<filter-name>shiroFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>shiroFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<!-- 防止spring内存溢出监听器 -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<listener>
<description>spring监听器</description>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- spring mvc servlet -->
<servlet>
<description>spring mvc servlet</description>
<servlet-name>springMvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<description>spring mvc 配置文件</description>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springMvc</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- Druid,监控数据库,以及WEB访问连接信息 -->
<!-- 参考: https://github.com/alibaba/druid/wiki/%E9%85%8D%E7%BD%AE_%E9%85%8D%E7%BD%AEWebStatFilter -->
<filter>
<filter-name>DruidWebStatFilter</filter-name>
<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
<init-param>
<param-name>exclusions</param-name>
<param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,*.jsp,/druid/*,/download/*</param-value>
</init-param>
<init-param>
<param-name>sessionStatMaxCount</param-name>
<param-value>2000</param-value>
</init-param>
<init-param>
<param-name>sessionStatEnable</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>principalSessionName</param-name>
<param-value>session_user_key</param-value>
</init-param>
<init-param>
<param-name>profileEnable</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>DruidWebStatFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>login.do</welcome-file>
</welcome-file-list>
<!-- 配置session超时时间,单位分钟 -->
<error-page>
<error-code>404</error-code>
<location>/error/404.do</location>
</error-page>
<error-page>
<error-code>400</error-code>
<location>/error/400.do</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/error/403.do</location>
</error-page>
<error-page>
<error-code>405</error-code>
<location>/error/405.do</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error/500.do</location>
</error-page>
<session-config>
<session-timeout>15</session-timeout>
</session-config>
</web-app>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment