增加jetty9插件

This commit is contained in:
zhuangqian 2016-09-14 12:20:02 +08:00
parent fc38ead777
commit 5919bf7193
6 changed files with 29 additions and 19 deletions

13
pom.xml
View File

@ -221,6 +221,19 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.8.v20150217</version>
<configuration>
<!-- <scanIntervalSeconds>10</scanIntervalSeconds> --><!-- 热部署时间间隔 -->
<reload>manual</reload><!-- 在控制台回车,重启工程 -->
<httpConnector>
<port>80</port><!-- 端口 -->
</httpConnector>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -4,7 +4,6 @@ import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@ -29,8 +28,8 @@ import com.smallchill.core.toolbox.kit.StrKit;
@RequestMapping("/ztree")
public class ZTreeController extends BladeController {
@RequestMapping("/open/{type}/{index}/{name}/{source}/{check}/{where}/{intercept}/{ext}/{val}")
public ModelAndView open(@PathVariable String type, @PathVariable String index, @PathVariable String name, @PathVariable String source, @PathVariable String check, @PathVariable String where, @PathVariable String intercept, @PathVariable String ext, @PathVariable String val){
@RequestMapping("/open")
public ModelAndView open(@RequestParam String type, @RequestParam String index, @RequestParam String name, @RequestParam String source, @RequestParam String check, @RequestParam String where, @RequestParam String intercept, @RequestParam String ext, @RequestParam String val){
ModelAndView view = new ModelAndView("/common/_function/_ztree.html");
view.addObject("type", getTypeName(type, source));
view.addObject("index", index);

View File

@ -23,8 +23,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.smallchill.common.base.BaseController;
import com.smallchill.core.annotation.Permission;
import com.smallchill.core.constant.ConstShiro;
import com.smallchill.core.shiro.ShiroKit;
import com.smallchill.core.toolbox.Func;
import com.smallchill.core.toolbox.Paras;
import com.smallchill.core.toolbox.ajax.AjaxResult;
@ -96,13 +96,11 @@ public class RoleController extends BaseController{
return BASE_PATH + "role_view.html";
}
@RequestMapping("/authority/{roleId}/{roleName}")
public String authority(@PathVariable String roleId, @PathVariable String roleName, ModelMap mm) {
if(!ShiroKit.hasAnyRoles(ConstShiro.ADMINISTRATOR + "," + ConstShiro.ADMIN)){
return "redirect:/unauth";
}
mm.put("roleId", roleId);
mm.put("roleName", Func.decodeUrl(roleName));
@Permission({ConstShiro.ADMINISTRATOR, ConstShiro.ADMIN})
@RequestMapping("/authority")
public String authority(ModelMap mm) {
mm.put("roleId", getParameter("roleId"));
mm.put("roleName", getParameterToDecode("roleName"));
return BASE_PATH + "role_authority.html";
}

View File

@ -13,13 +13,13 @@
<textarea id="${x.index!}_editor" name="${x.index!}_editor" ></textarea>
</div>
<script charset="utf-8" src="${basePath}/static/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="${ctxPath}/static/kindeditor/kindeditor.js"></script>
<script type="text/javascript">
$(function(){
KindEditor.ready(function(K) {
var editor = K.create('textarea[name="${x.index!}_editor"]', {
uploadJson : '${basePath}/kindeditor/upload_${x.blob!'json'}',
fileManagerJson : '${basePath}/kindeditor/file_manager_json',
uploadJson : '${ctxPath}/kindeditor/upload_${x.blob!'json'}',
fileManagerJson : '${ctxPath}/kindeditor/file_manager_json',
allowFileManager : false
});
//----插入文件-----
@ -54,7 +54,7 @@
function _${x.index!}_initFileUpload(ids, type){
$.ajax({
type: "post",
url: "${basePath}/kindeditor/initfile",
url: "${ctxPath}/kindeditor/initfile",
dataType: "json",
async: false,
data: {ids : ids},
@ -64,7 +64,7 @@
for(var x = 0; x < file.length; x++){
var id = file[x].id;
var name = file[x].name;
var url = "${basePath}/kindeditor/renderFile/" + id;
var url = "${ctxPath}/kindeditor/renderFile/" + id;
if(type == "edit"){
$("#${x.index!}_file").append(_${x.index!}_getFile(url, id, name));
}

View File

@ -15,7 +15,7 @@
area: ["250", "420px"],
fix: false, //不固定
maxmin: true,
content: "${basePath}/ztree/open/${x.type!0}/_${x.index!0}/${x.name!0}/${x.source!0}/${x.check!0}/${x.where!0}/${x.intercept!0}/${x.ext!0}/" + val
content: "${ctxPath}/ztree/open/?type=${x.type!0}&index=_${x.index!0}&name=${x.name!0}&source=${x.source!0}&check=${x.check!0}&where=${x.where!0}&intercept=${x.intercept!0}&ext=${x.ext!0}&val=" + val
});
});
@ -27,7 +27,7 @@
});
function initOpenTree(val){
$.post("${basePath}/ztree/getTreeListName",{source:"${x.source!}", type:"${x.type!}", where:"${x.where!}", intercept:"${x.intercept!}", val:val},function(data){
$.post("${ctxPath}/ztree/getTreeListName",{source:"${x.source!}", type:"${x.type!}", where:"${x.where!}", intercept:"${x.intercept!}", val:val},function(data){
if(data.code === 0){
$("#_${x.index!}_INPUT").val(data.data);
}

View File

@ -148,7 +148,7 @@ var exwhere;
$.post(ctx + "/role/getPowerById", { id: ids }, function (data) {
if (data.code === 0) {
var roleName=rowData.NAME;
_this.open(_this.url + split + ids + split + roleName);
_this.open(_this.url + "?roleId=" + ids + "&roleName=" + roleName);
}
else{
layer_alert('请先给上级角色分配权限!', "warn");