mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-30 02:48:17 +08:00
调整项目结构
This commit is contained in:
parent
c255766c1d
commit
5ee2a2ebaf
@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# description: Auto-starts boot
|
||||
Tag="$2"
|
||||
MainClass="$3"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"test":{
|
||||
"BusinessApplication":{
|
||||
"lib":"/tashimall/boot-application/business-web/lib",
|
||||
"mainClass":"com.yokead.Application",
|
||||
"createTime":"2017-11-30 16:04:35",
|
||||
|
@ -4,10 +4,11 @@ import cn.jiangzeyin.common.DefaultSystemLog;
|
||||
import cn.jiangzeyin.common.JsonMessage;
|
||||
import cn.jiangzeyin.common.interceptor.LoginInterceptor;
|
||||
import cn.jiangzeyin.controller.base.AbstractBaseControl;
|
||||
import cn.jiangzeyin.service.IndexService;
|
||||
import cn.jiangzeyin.service.UserService;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -16,25 +17,27 @@ import javax.annotation.Resource;
|
||||
@RequestMapping(value = "/")
|
||||
public class IndexControl extends AbstractBaseControl {
|
||||
|
||||
@Resource
|
||||
IndexService indexService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@RequestMapping(value = "error", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
|
||||
public String error() {
|
||||
return "error";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 加载首页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "index")
|
||||
@RequestMapping(value = "index", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
|
||||
public String index() {
|
||||
|
||||
return "index";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "welcome")
|
||||
public String welcome() {
|
||||
|
||||
return "welcome";
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,10 @@ import cn.jiangzeyin.controller.base.AbstractBaseControl;
|
||||
import cn.jiangzeyin.model.ProjectInfoModel;
|
||||
import cn.jiangzeyin.service.manage.ManageService;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
@ -37,7 +39,7 @@ public class FileControl extends AbstractBaseControl {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "filemanage")
|
||||
@RequestMapping(value = "filemanage", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
|
||||
public String fileManage(String id) {
|
||||
setAttribute("id", id);
|
||||
return "manage/filemanage";
|
||||
@ -113,10 +115,9 @@ public class FileControl extends AbstractBaseControl {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "getFileList")
|
||||
@RequestMapping(value = "getFileList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||
@ResponseBody
|
||||
public String getFileList(String id) {
|
||||
|
||||
try {
|
||||
// 查询项目路径
|
||||
ProjectInfoModel pim = manageService.getProjectInfo(id);
|
||||
|
@ -115,7 +115,6 @@ public class BaseService {
|
||||
*/
|
||||
public JSONObject getJsonObject(String filename, String key) throws IOException {
|
||||
JSONObject json_data = getJsonObject(filename);
|
||||
|
||||
return json_data.getJSONObject(key);
|
||||
}
|
||||
|
||||
@ -127,8 +126,6 @@ public class BaseService {
|
||||
* @throws IOException
|
||||
*/
|
||||
public JSONObject getJsonObject(String filename) throws IOException {
|
||||
JSONObject json_data = (JSONObject) JsonUtil.readJson(getDataFilePath(filename));
|
||||
|
||||
return json_data;
|
||||
return (JSONObject) JsonUtil.readJson(getDataFilePath(filename));
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
package cn.jiangzeyin.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class IndexService extends BaseService{
|
||||
|
||||
|
||||
}
|
||||
//package cn.jiangzeyin.service;
|
||||
//
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//@Service
|
||||
//public class IndexService extends BaseService{
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
@ -14,10 +14,10 @@ import javax.websocket.server.PathParam;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* socket
|
||||
* Created by jiangzeyin on 2017/9/8.
|
||||
*/
|
||||
@ServerEndpoint(value = "/console/{userInfo}")
|
||||
@ -42,10 +42,8 @@ public class LogWebSocketHandle implements TailLogThread.Evn {
|
||||
JSONObject obj = service.getJsonObject("user.json");
|
||||
|
||||
Set<String> set_key = obj.keySet();
|
||||
Iterator<String> iter_key = set_key.iterator();
|
||||
|
||||
while (iter_key.hasNext()) {
|
||||
String str_key = iter_key.next();
|
||||
for (String str_key : set_key) {
|
||||
JSONObject json_user = obj.getJSONObject(str_key);
|
||||
String str_userMd5 = Md5Util.getString(String.format("%s:%s", json_user.getString("id"), json_user.getString("password")));
|
||||
if (str_userMd5.equals(userInfo)) {
|
||||
|
1
src/main/resources/vm/error.vm
Normal file
1
src/main/resources/vm/error.vm
Normal file
@ -0,0 +1 @@
|
||||
错误啦
|
Loading…
Reference in New Issue
Block a user