更改modular的包结构

pull/65/head
fengshuonan 2021-01-24 11:43:33 +08:00
parent 0f58f0aea4
commit a51bf2b3cf
52 changed files with 133 additions and 64 deletions

View File

@ -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;

View File

@ -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();
}
}

View File

@ -0,0 +1,4 @@
/**
*
*/
package cn.stylefeng.guns.modular.business;

View File

@ -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方法");
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.common.pojo;
package cn.stylefeng.guns.modular.system.common.pojo;
import lombok.Data;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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";
}
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.system.model;
package cn.stylefeng.guns.modular.system.monitor.model;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.system.model;
package cn.stylefeng.guns.modular.system.monitor.model;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.system.model;
package cn.stylefeng.guns.modular.system.monitor.model;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.system.model;
package cn.stylefeng.guns.modular.system.monitor.model;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.system.model;
package cn.stylefeng.guns.modular.system.monitor.model;
import lombok.Data;

View File

@ -1,4 +1,4 @@
package cn.stylefeng.guns.modular.system.model;
package cn.stylefeng.guns.modular.system.monitor.model;
import lombok.Data;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -0,0 +1,4 @@
/**
* Guns
*/
package cn.stylefeng.guns.modular.system;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;