mirror of https://gitee.com/stylefeng/guns
更改modular的包结构
parent
0f58f0aea4
commit
a51bf2b3cf
|
@ -1,7 +1,7 @@
|
|||
package cn.stylefeng.guns.core.listener;
|
||||
|
||||
import cn.stylefeng.guns.core.consts.ProjectConstants;
|
||||
import cn.stylefeng.guns.modular.index.service.InitAdminService;
|
||||
import cn.stylefeng.guns.modular.system.index.service.InitAdminService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package cn.stylefeng.guns.modular.business.controller;
|
||||
|
||||
import cn.stylefeng.guns.modular.business.service.DemoService;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 示例控制器
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/24 10:57
|
||||
*/
|
||||
@RestController
|
||||
@ApiResource(name = "示例")
|
||||
public class DemoController {
|
||||
|
||||
@Resource
|
||||
private DemoService demoService;
|
||||
|
||||
/**
|
||||
* 示例方法
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/24 10:59
|
||||
*/
|
||||
@GetResource(name = "示例方法", path = "/json/success")
|
||||
public ResponseData renderSuccess() {
|
||||
demoService.demoService();
|
||||
return new SuccessResponseData();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* 这个包写用户的业务的代码
|
||||
*/
|
||||
package cn.stylefeng.guns.modular.business;
|
|
@ -0,0 +1,24 @@
|
|||
package cn.stylefeng.guns.modular.business.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 示例服务
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/24 10:58
|
||||
*/
|
||||
@Service
|
||||
public class DemoService {
|
||||
|
||||
/**
|
||||
* demo方法
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/24 10:58
|
||||
*/
|
||||
public void demoService(){
|
||||
System.out.println("这是一个demo方法");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.api;
|
||||
package cn.stylefeng.guns.modular.system.api;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.app;
|
||||
package cn.stylefeng.guns.modular.system.app;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.common;
|
||||
package cn.stylefeng.guns.modular.system.common;
|
||||
|
||||
import cn.stylefeng.guns.modular.common.pojo.CommonTreeRequest;
|
||||
import cn.stylefeng.guns.modular.system.common.pojo.CommonTreeRequest;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.common.pojo;
|
||||
package cn.stylefeng.guns.modular.system.common.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.config;
|
||||
package cn.stylefeng.guns.modular.system.config;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.dashboard;
|
||||
package cn.stylefeng.guns.modular.system.dashboard;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.datasource;
|
||||
package cn.stylefeng.guns.modular.system.datasource;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.datasource.test;
|
||||
package cn.stylefeng.guns.modular.system.datasource.test;
|
||||
|
||||
import cn.stylefeng.guns.modular.datasource.test.service.TranTestService;
|
||||
import cn.stylefeng.guns.modular.system.datasource.test.service.TranTestService;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.datasource.test;
|
||||
package cn.stylefeng.guns.modular.system.datasource.test;
|
||||
|
||||
import cn.stylefeng.guns.modular.datasource.test.service.TranTestService;
|
||||
import cn.stylefeng.guns.modular.system.datasource.test.service.TranTestService;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.datasource.test.factory;
|
||||
package cn.stylefeng.guns.modular.system.datasource.test.factory;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.entity.SysUser;
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.datasource.test.service;
|
||||
package cn.stylefeng.guns.modular.system.datasource.test.service;
|
||||
|
||||
import cn.stylefeng.guns.modular.datasource.test.factory.NormalUserFactory;
|
||||
import cn.stylefeng.guns.modular.system.datasource.test.factory.NormalUserFactory;
|
||||
import cn.stylefeng.roses.kernel.dsctn.api.annotation.DataSource;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.entity.SysUser;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.mapper.SysUserMapper;
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.datasource.test.service;
|
||||
package cn.stylefeng.guns.modular.system.datasource.test.service;
|
||||
|
||||
import cn.stylefeng.guns.modular.datasource.test.factory.NormalUserFactory;
|
||||
import cn.stylefeng.guns.modular.system.datasource.test.factory.NormalUserFactory;
|
||||
import cn.stylefeng.roses.kernel.dsctn.api.annotation.DataSource;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.entity.SysUser;
|
||||
import cn.stylefeng.roses.kernel.system.modular.user.mapper.SysUserMapper;
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.datasource.test.service;
|
||||
package cn.stylefeng.guns.modular.system.datasource.test.service;
|
||||
|
||||
import cn.stylefeng.guns.modular.datasource.test.factory.NormalUserFactory;
|
||||
import cn.stylefeng.guns.modular.system.datasource.test.factory.NormalUserFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.dict;
|
||||
package cn.stylefeng.guns.modular.system.dict;
|
||||
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.dict;
|
||||
package cn.stylefeng.guns.modular.system.dict;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.error;
|
||||
package cn.stylefeng.guns.modular.system.error;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
|
@ -27,4 +27,4 @@ public class ErrorViewController {
|
|||
return "/login.html";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.file;
|
||||
package cn.stylefeng.guns.modular.system.file;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.index.controller;
|
||||
package cn.stylefeng.guns.modular.system.index.controller;
|
||||
|
||||
import cn.stylefeng.guns.modular.index.service.IndexService;
|
||||
import cn.stylefeng.guns.modular.system.index.service.IndexService;
|
||||
import cn.stylefeng.roses.kernel.auth.api.context.LoginContext;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.index.service;
|
||||
package cn.stylefeng.guns.modular.system.index.service;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.index.service;
|
||||
package cn.stylefeng.guns.modular.system.index.service;
|
||||
|
||||
import cn.stylefeng.guns.core.consts.ProjectConstants;
|
||||
import cn.stylefeng.roses.kernel.resource.modular.entity.SysResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.log;
|
||||
package cn.stylefeng.guns.modular.system.log;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.log;
|
||||
package cn.stylefeng.guns.modular.system.log;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.login;
|
||||
package cn.stylefeng.guns.modular.system.login;
|
||||
|
||||
import cn.stylefeng.roses.kernel.auth.api.AuthServiceApi;
|
||||
import cn.stylefeng.roses.kernel.auth.api.context.LoginContext;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.menu;
|
||||
package cn.stylefeng.guns.modular.system.menu;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.menu;
|
||||
package cn.stylefeng.guns.modular.system.menu;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.message;
|
||||
package cn.stylefeng.guns.modular.system.message;
|
||||
|
||||
import cn.stylefeng.roses.kernel.message.api.MessageApi;
|
||||
import cn.stylefeng.roses.kernel.message.api.enums.MessageReadFlagEnum;
|
|
@ -1,11 +1,11 @@
|
|||
package cn.stylefeng.guns.modular.system.controller;
|
||||
package cn.stylefeng.guns.modular.system.monitor.controller;
|
||||
|
||||
import cn.hutool.core.util.EscapeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.stylefeng.guns.core.consts.ProjectConstants;
|
||||
import cn.stylefeng.guns.modular.system.model.PromResultInfo;
|
||||
import cn.stylefeng.guns.modular.system.service.MetricService;
|
||||
import cn.stylefeng.guns.modular.system.warpper.SystemHardwareWrapper;
|
||||
import cn.stylefeng.guns.modular.system.monitor.model.PromResultInfo;
|
||||
import cn.stylefeng.guns.modular.system.monitor.service.MetricService;
|
||||
import cn.stylefeng.guns.modular.system.monitor.warpper.SystemHardwareWrapper;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import com.alibaba.fastjson.JSON;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import lombok.Setter;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import lombok.Setter;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.system.model;
|
||||
package cn.stylefeng.guns.modular.system.monitor.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package cn.stylefeng.guns.modular.system.service;
|
||||
package cn.stylefeng.guns.modular.system.monitor.service;
|
||||
|
||||
import cn.stylefeng.guns.modular.system.model.PromResultInfo;
|
||||
import cn.stylefeng.guns.modular.system.monitor.model.PromResultInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package cn.stylefeng.guns.modular.system.service.impl;
|
||||
package cn.stylefeng.guns.modular.system.monitor.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.stylefeng.guns.core.consts.ProjectConstants;
|
||||
import cn.stylefeng.guns.modular.system.model.PromResponseInfo;
|
||||
import cn.stylefeng.guns.modular.system.model.PromResultInfo;
|
||||
import cn.stylefeng.guns.modular.system.service.MetricService;
|
||||
import cn.stylefeng.guns.modular.system.monitor.model.PromResponseInfo;
|
||||
import cn.stylefeng.guns.modular.system.monitor.model.PromResultInfo;
|
||||
import cn.stylefeng.guns.modular.system.monitor.service.MetricService;
|
||||
import com.alibaba.excel.util.StringUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.springframework.stereotype.Service;
|
|
@ -1,8 +1,8 @@
|
|||
package cn.stylefeng.guns.modular.system.warpper;
|
||||
package cn.stylefeng.guns.modular.system.monitor.warpper;
|
||||
|
||||
import cn.hutool.core.net.NetUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.stylefeng.guns.modular.system.model.*;
|
||||
import cn.stylefeng.guns.modular.system.monitor.model.*;
|
||||
import cn.stylefeng.roses.kernel.rule.util.IpInfoUtils;
|
||||
import lombok.Data;
|
||||
import oshi.SystemInfo;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.notice;
|
||||
package cn.stylefeng.guns.modular.system.notice;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.organization;
|
||||
package cn.stylefeng.guns.modular.system.organization;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* 这个包是Guns框架自带业务的代码
|
||||
*/
|
||||
package cn.stylefeng.guns.modular.system;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.position;
|
||||
package cn.stylefeng.guns.modular.system.position;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.resource;
|
||||
package cn.stylefeng.guns.modular.system.resource;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.role;
|
||||
package cn.stylefeng.guns.modular.system.role;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.timer;
|
||||
package cn.stylefeng.guns.modular.system.timer;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.user;
|
||||
package cn.stylefeng.guns.modular.system.user;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.stylefeng.guns.modular.user;
|
||||
package cn.stylefeng.guns.modular.system.user;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
Loading…
Reference in New Issue