diff --git a/.gitignore b/.gitignore
index 492e1985..23676208 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,26 +1,3 @@
-!.mvn/wrapper/maven-wrapper.jar
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
### IntelliJ IDEA ###
-.mvn
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-/nbproject/private/
-/build/
-/nbbuild/
-/dist/
-/nbdist/
-/target/
-/.nb-gradle/
\ No newline at end of file
+.idea/*
+*/target/*
\ No newline at end of file
diff --git a/README.md b/README.md
index c94cd0de..dcbda433 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,9 @@
# eladmin
-项目基于 Spring Boot 2.1.0 、 Spring boot Jpa、 Spring Security、redis、Vue的前后端分离的权限管理系统, 权限控制采用 RBAC(Role-Based Access Control,基于角色的访问控制),前端菜单支持动态路由
+项目基于 Spring Boot 2.1.0 、 Spring boot Jpa、 Spring Security、redis、Vue的前后端分离的权限管理系统,项目采用分模块开发方式, 权限控制采用 RBAC(Role-Based Access Control,基于角色的访问控制),前端菜单支持动态路由
#### 前端源码
+eladmin-qt和eladmin-qd只是命名方式的区别,无其他区别
- 码云:[https://gitee.com/elunez/eladmin-qt](https://gitee.com/elunez/eladmin-qt)
- github:[https://github.com/elunez/eladmin-qd](https://github.com/elunez/eladmin-qd)
@@ -35,8 +36,10 @@
- 权限管理 权限细化到接口
- 菜单管理 已实现菜单动态路由,后端可配置化,支持多级菜单
- 定时任务 整合Quartz做定时任务,加入任务日志,任务运行情况一目了然
+ - 代码生成 高灵活度一键生成前后端代码,减少百分之80左右的工作任务
- 系统监控
- - 系统日志 使用apo记录用户操作日志,并且记录异常堆栈信息
+ - 操作日志 使用apo记录用户操作日志
+ - 异常日志 记录操作过程中的异常,并且提供查看异常的堆栈信息
- 系统缓存 使用jedis将缓存操作可视化,并提供对redis的基本操作,可根据需求自行扩展
- 实时控制台 实时打印logback日志,来自微强迫症患者的精心配色,更好的监控系统的运行状态
- SQL监控 采用druid 监控数据库访问性能,默认用户名admin,密码123456
@@ -51,30 +54,36 @@
```
#### 项目结构
```
-- common 公共包
- - aop 记录日志与接口限流
- - exception 项目异常处理
+# 项目模块如下
+- eladmin-common 公共模块
+ - aop.limit 接口限流自定义注解
+ - exception 项目统一异常的处理
- mapper mapstruct的通用mapper
- redis redis缓存相关配置
- swagger2 接口文档配置
- utils 通用工具
-- core 核心包
- - config JWT的安全过滤器配置与跨域配置
- - rest 用户授权的接口
- - security 配置spring security
- - service 用户登录与权限的处理
- - utils 包含加密工具与JWT工具
-- monitor 系统监控
- - config 配置日志拦截器与WebSocket等
- - domain 实体类
- - repository 数据库操作
- - rest 前端控制器
- - service 业务接口
- - impl 业务接口实现
- - query 业务查询
-- quartz 定时任务
-- system 系统管理
-- tools 第三方工具
+- eladmin-system 系统核心模块
+ - config 配置跨域与静态资源
+ - modules 系统相关模块
+ - monitor 系统监控
+ - config 配置日志拦截器与WebSocket等
+ - domain 实体类
+ - repository 数据库操作
+ - rest 前端控制器
+ - service 业务接口
+ - impl 业务接口实现
+ - query 业务查询
+ - quartz 定时任务
+ - security 系统安全
+ - config JWT的安全过滤器配置
+ - rest 用户登录授权的接口
+ - security 配置spring security
+ - service 用户登录与权限的处理
+ - utils JWT工具
+ - system 系统管理
+- eladmin-logging 系统日志模块
+- eladmin-tools 系统第三方工具模块
+- eladmin-generator 系统代码生成模块
```
#### 后端技术栈
diff --git a/eladmin-common/eladmin-common.iml b/eladmin-common/eladmin-common.iml
new file mode 100644
index 00000000..1c92e346
--- /dev/null
+++ b/eladmin-common/eladmin-common.iml
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eladmin-common/pom.xml b/eladmin-common/pom.xml
new file mode 100644
index 00000000..472ab79e
--- /dev/null
+++ b/eladmin-common/pom.xml
@@ -0,0 +1,14 @@
+
+
+
+ eladmin
+ me.zhengjie
+ 1.5
+
+ 4.0.0
+
+ eladmin-common
+
+
\ No newline at end of file
diff --git a/src/main/java/me/zhengjie/common/aop/limit/Limit.java b/eladmin-common/src/main/java/me/zhengjie/aop/limit/Limit.java
similarity index 90%
rename from src/main/java/me/zhengjie/common/aop/limit/Limit.java
rename to eladmin-common/src/main/java/me/zhengjie/aop/limit/Limit.java
index cc2febd5..502e4e6f 100644
--- a/src/main/java/me/zhengjie/common/aop/limit/Limit.java
+++ b/eladmin-common/src/main/java/me/zhengjie/aop/limit/Limit.java
@@ -1,4 +1,6 @@
-package me.zhengjie.common.aop.limit;
+package me.zhengjie.aop.limit;
+
+import me.zhengjie.aspect.LimitType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/src/main/java/me/zhengjie/common/aop/limit/LimitAspect.java b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java
similarity index 90%
rename from src/main/java/me/zhengjie/common/aop/limit/LimitAspect.java
rename to eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java
index 86747ea1..4ac6ae9a 100644
--- a/src/main/java/me/zhengjie/common/aop/limit/LimitAspect.java
+++ b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java
@@ -1,10 +1,10 @@
-package me.zhengjie.common.aop.limit;
+package me.zhengjie.aspect;
import com.google.common.collect.ImmutableList;
-import me.zhengjie.common.exception.BadRequestException;
-import me.zhengjie.common.utils.IpUtil;
-import me.zhengjie.common.utils.RequestHolder;
-import org.apache.commons.lang3.StringUtils;
+import me.zhengjie.aop.limit.Limit;
+import me.zhengjie.exception.BadRequestException;
+import me.zhengjie.utils.RequestHolder;
+import me.zhengjie.utils.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
@@ -17,8 +17,6 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.data.redis.core.script.RedisScript;
import org.springframework.stereotype.Component;
-
-
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
@@ -30,9 +28,8 @@ public class LimitAspect {
private static final Logger logger = LoggerFactory.getLogger(LimitAspect.class);
- @Pointcut("@annotation(Limit)")
+ @Pointcut("@annotation(me.zhengjie.aop.limit.Limit)")
public void pointcut() {
-//
}
@Around("pointcut()")
@@ -47,7 +44,7 @@ public class LimitAspect {
if (StringUtils.isEmpty(key)) {
switch (limitType) {
case IP:
- key = IpUtil.getIP(request);
+ key = StringUtils.getIP(request);
break;
default:
key = signatureMethod.getName();
diff --git a/src/main/java/me/zhengjie/common/aop/limit/LimitType.java b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java
similarity index 63%
rename from src/main/java/me/zhengjie/common/aop/limit/LimitType.java
rename to eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java
index 7e869753..6f383047 100644
--- a/src/main/java/me/zhengjie/common/aop/limit/LimitType.java
+++ b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java
@@ -1,4 +1,4 @@
-package me.zhengjie.common.aop.limit;
+package me.zhengjie.aspect;
public enum LimitType {
CUSTOMER,
diff --git a/src/main/java/me/zhengjie/common/exception/BadRequestException.java b/eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java
similarity index 93%
rename from src/main/java/me/zhengjie/common/exception/BadRequestException.java
rename to eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java
index bfbf7f96..fda001e8 100644
--- a/src/main/java/me/zhengjie/common/exception/BadRequestException.java
+++ b/eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java
@@ -1,4 +1,4 @@
-package me.zhengjie.common.exception;
+package me.zhengjie.exception;
import lombok.Getter;
import org.springframework.http.HttpStatus;
diff --git a/src/main/java/me/zhengjie/common/exception/EntityExistException.java b/eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java
similarity index 96%
rename from src/main/java/me/zhengjie/common/exception/EntityExistException.java
rename to eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java
index 05db35e4..2f086b6d 100644
--- a/src/main/java/me/zhengjie/common/exception/EntityExistException.java
+++ b/eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java
@@ -1,4 +1,4 @@
-package me.zhengjie.common.exception;
+package me.zhengjie.exception;
import org.springframework.util.StringUtils;
diff --git a/src/main/java/me/zhengjie/common/exception/EntityNotFoundException.java b/eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java
similarity index 96%
rename from src/main/java/me/zhengjie/common/exception/EntityNotFoundException.java
rename to eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java
index 2dba29e2..a7262288 100644
--- a/src/main/java/me/zhengjie/common/exception/EntityNotFoundException.java
+++ b/eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java
@@ -1,4 +1,4 @@
-package me.zhengjie.common.exception;
+package me.zhengjie.exception;
import org.springframework.util.StringUtils;
diff --git a/src/main/java/me/zhengjie/common/exception/handler/ApiError.java b/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java
similarity index 92%
rename from src/main/java/me/zhengjie/common/exception/handler/ApiError.java
rename to eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java
index d4df6610..91861a3a 100644
--- a/src/main/java/me/zhengjie/common/exception/handler/ApiError.java
+++ b/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java
@@ -1,7 +1,8 @@
-package me.zhengjie.common.exception.handler;
+package me.zhengjie.exception.handler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
+
import java.time.LocalDateTime;
/**
diff --git a/src/main/java/me/zhengjie/common/exception/handler/GlobalExceptionHandler.java b/eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java
similarity index 87%
rename from src/main/java/me/zhengjie/common/exception/handler/GlobalExceptionHandler.java
rename to eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java
index 30d5987e..701a3590 100644
--- a/src/main/java/me/zhengjie/common/exception/handler/GlobalExceptionHandler.java
+++ b/eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java
@@ -1,19 +1,17 @@
-package me.zhengjie.common.exception.handler;
+package me.zhengjie.exception.handler;
import lombok.extern.slf4j.Slf4j;
-import me.zhengjie.common.exception.BadRequestException;
-import me.zhengjie.common.exception.EntityExistException;
-import me.zhengjie.common.exception.EntityNotFoundException;
-import me.zhengjie.common.utils.ThrowableUtil;
+import me.zhengjie.exception.BadRequestException;
+import me.zhengjie.exception.EntityExistException;
+import me.zhengjie.exception.EntityNotFoundException;
+import me.zhengjie.utils.ThrowableUtil;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
-import static org.springframework.http.HttpStatus.BAD_REQUEST;
-import static org.springframework.http.HttpStatus.FORBIDDEN;
-import static org.springframework.http.HttpStatus.NOT_FOUND;
+import java.nio.file.AccessDeniedException;
+import static org.springframework.http.HttpStatus.*;
/**
* @author jie
diff --git a/src/main/java/me/zhengjie/common/mapper/EntityMapper.java b/eladmin-common/src/main/java/me/zhengjie/mapper/EntityMapper.java
similarity index 94%
rename from src/main/java/me/zhengjie/common/mapper/EntityMapper.java
rename to eladmin-common/src/main/java/me/zhengjie/mapper/EntityMapper.java
index b6ec389a..d02840fa 100644
--- a/src/main/java/me/zhengjie/common/mapper/EntityMapper.java
+++ b/eladmin-common/src/main/java/me/zhengjie/mapper/EntityMapper.java
@@ -1,4 +1,4 @@
-package me.zhengjie.common.mapper;
+package me.zhengjie.mapper;
import java.util.List;
diff --git a/src/main/java/me/zhengjie/common/redis/FastJsonRedisSerializer.java b/eladmin-common/src/main/java/me/zhengjie/redis/FastJsonRedisSerializer.java
similarity index 97%
rename from src/main/java/me/zhengjie/common/redis/FastJsonRedisSerializer.java
rename to eladmin-common/src/main/java/me/zhengjie/redis/FastJsonRedisSerializer.java
index 8ccad494..d2e224c8 100644
--- a/src/main/java/me/zhengjie/common/redis/FastJsonRedisSerializer.java
+++ b/eladmin-common/src/main/java/me/zhengjie/redis/FastJsonRedisSerializer.java
@@ -1,9 +1,10 @@
-package me.zhengjie.common.redis;
+package me.zhengjie.redis;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
+
import java.nio.charset.Charset;
/**
diff --git a/src/main/java/me/zhengjie/common/redis/RedisConfig.java b/eladmin-common/src/main/java/me/zhengjie/redis/RedisConfig.java
similarity index 83%
rename from src/main/java/me/zhengjie/common/redis/RedisConfig.java
rename to eladmin-common/src/main/java/me/zhengjie/redis/RedisConfig.java
index bf66187f..f21c4e73 100644
--- a/src/main/java/me/zhengjie/common/redis/RedisConfig.java
+++ b/eladmin-common/src/main/java/me/zhengjie/redis/RedisConfig.java
@@ -1,23 +1,25 @@
-package me.zhengjie.common.redis;
+package me.zhengjie.redis;
-import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.parser.ParserConfig;
import lombok.extern.slf4j.Slf4j;
+import me.zhengjie.utils.StringUtils;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.cache.interceptor.KeyGenerator;
-import org.springframework.data.redis.cache.RedisCacheConfiguration;
-import org.springframework.data.redis.serializer.*;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisOperations;
import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import java.time.Duration;
@@ -60,7 +62,7 @@ public class RedisConfig extends CachingConfigurerSupport {
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
jedisPoolConfig.setMaxIdle(maxIdle);
jedisPoolConfig.setMaxWaitMillis(maxWaitMillis);
- if (StrUtil.isNotBlank(password)) {
+ if (StringUtils.isNotBlank(password)) {
return new JedisPool(jedisPoolConfig, host, port, timeout, password);
} else {
return new JedisPool(jedisPoolConfig, host, port,timeout);
@@ -68,7 +70,7 @@ public class RedisConfig extends CachingConfigurerSupport {
}
/**
- * 设置 redis 数据默认过期时间
+ * 设置 redis 数据默认过期时间,默认1天
* 设置@cacheable 序列化方式
* @return
*/
@@ -76,7 +78,7 @@ public class RedisConfig extends CachingConfigurerSupport {
public RedisCacheConfiguration redisCacheConfiguration(){
FastJsonRedisSerializer
";
+ content = template.render(Dict.create().set("code",code.getCode()));
emailVo = new EmailVo(Arrays.asList(code.getValue()),"eladmin后台管理系统",content);
timedDestruction(verificationCodeRepository.save(code));
// 存在就再次发送原来的验证码
} else {
- content = ElAdminConstant.EMAIL_CODE + verificationCode.getCode() + "";
+ content = template.render(Dict.create().set("code",verificationCode.getCode()));
emailVo = new EmailVo(Arrays.asList(verificationCode.getValue()),"eladmin后台管理系统",content);
}
return emailVo;
diff --git a/src/main/java/me/zhengjie/tools/service/query/PictureQueryService.java b/eladmin-tools/src/main/java/me/zhengjie/service/query/PictureQueryService.java
similarity index 91%
rename from src/main/java/me/zhengjie/tools/service/query/PictureQueryService.java
rename to eladmin-tools/src/main/java/me/zhengjie/service/query/PictureQueryService.java
index 13d8fcbe..4624b1a2 100644
--- a/src/main/java/me/zhengjie/tools/service/query/PictureQueryService.java
+++ b/eladmin-tools/src/main/java/me/zhengjie/service/query/PictureQueryService.java
@@ -1,8 +1,8 @@
-package me.zhengjie.tools.service.query;
+package me.zhengjie.service.query;
-import me.zhengjie.common.utils.PageUtil;
-import me.zhengjie.tools.domain.Picture;
-import me.zhengjie.tools.repository.PictureRepository;
+import me.zhengjie.domain.Picture;
+import me.zhengjie.repository.PictureRepository;
+import me.zhengjie.utils.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
diff --git a/src/main/java/me/zhengjie/tools/service/query/QiNiuQueryService.java b/eladmin-tools/src/main/java/me/zhengjie/service/query/QiNiuQueryService.java
similarity index 91%
rename from src/main/java/me/zhengjie/tools/service/query/QiNiuQueryService.java
rename to eladmin-tools/src/main/java/me/zhengjie/service/query/QiNiuQueryService.java
index d284fc70..853652de 100644
--- a/src/main/java/me/zhengjie/tools/service/query/QiNiuQueryService.java
+++ b/eladmin-tools/src/main/java/me/zhengjie/service/query/QiNiuQueryService.java
@@ -1,8 +1,8 @@
-package me.zhengjie.tools.service.query;
+package me.zhengjie.service.query;
-import me.zhengjie.common.utils.PageUtil;
-import me.zhengjie.tools.domain.QiniuContent;
-import me.zhengjie.tools.repository.QiniuContentRepository;
+import me.zhengjie.domain.QiniuContent;
+import me.zhengjie.repository.QiniuContentRepository;
+import me.zhengjie.utils.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
diff --git a/src/main/java/me/zhengjie/tools/util/AliPayStatusEnum.java b/eladmin-tools/src/main/java/me/zhengjie/util/AliPayStatusEnum.java
similarity index 95%
rename from src/main/java/me/zhengjie/tools/util/AliPayStatusEnum.java
rename to eladmin-tools/src/main/java/me/zhengjie/util/AliPayStatusEnum.java
index a61f3829..5a54da5a 100644
--- a/src/main/java/me/zhengjie/tools/util/AliPayStatusEnum.java
+++ b/eladmin-tools/src/main/java/me/zhengjie/util/AliPayStatusEnum.java
@@ -1,4 +1,4 @@
-package me.zhengjie.tools.util;
+package me.zhengjie.util;
/**
* 支付状态
diff --git a/src/main/java/me/zhengjie/tools/util/AlipayUtils.java b/eladmin-tools/src/main/java/me/zhengjie/util/AlipayUtils.java
similarity index 96%
rename from src/main/java/me/zhengjie/tools/util/AlipayUtils.java
rename to eladmin-tools/src/main/java/me/zhengjie/util/AlipayUtils.java
index fbdccb18..e57c43e2 100644
--- a/src/main/java/me/zhengjie/tools/util/AlipayUtils.java
+++ b/eladmin-tools/src/main/java/me/zhengjie/util/AlipayUtils.java
@@ -1,9 +1,9 @@
-package me.zhengjie.tools.util;
+package me.zhengjie.util;
import cn.hutool.core.util.StrUtil;
import com.alipay.api.AlipayApiException;
import com.alipay.api.internal.util.AlipaySignature;
-import me.zhengjie.tools.domain.AlipayConfig;
+import me.zhengjie.domain.AlipayConfig;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
diff --git a/src/main/java/me/zhengjie/tools/util/QiNiuUtil.java b/eladmin-tools/src/main/java/me/zhengjie/util/QiNiuUtil.java
similarity index 95%
rename from src/main/java/me/zhengjie/tools/util/QiNiuUtil.java
rename to eladmin-tools/src/main/java/me/zhengjie/util/QiNiuUtil.java
index c75b3e0d..433342d2 100644
--- a/src/main/java/me/zhengjie/tools/util/QiNiuUtil.java
+++ b/eladmin-tools/src/main/java/me/zhengjie/util/QiNiuUtil.java
@@ -1,8 +1,8 @@
-package me.zhengjie.tools.util;
+package me.zhengjie.util;
import com.qiniu.common.Zone;
import com.qiniu.storage.Configuration;
-import me.zhengjie.common.utils.FileUtil;
+import me.zhengjie.utils.FileUtil;
import java.text.SimpleDateFormat;
import java.util.Date;
diff --git a/eladmin.iml b/eladmin.iml
new file mode 100644
index 00000000..7e155f9c
--- /dev/null
+++ b/eladmin.iml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mvnw b/mvnw
deleted file mode 100644
index 5551fde8..00000000
--- a/mvnw
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/bin/sh
-# ----------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
-#
-# Required ENV vars:
-# ------------------
-# JAVA_HOME - location of a JDK home dir
-#
-# Optional ENV vars
-# -----------------
-# M2_HOME - location of maven2's installed home dir
-# MAVEN_OPTS - parameters passed to the Java VM when running Maven
-# e.g. to debug Maven itself, use
-# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
-
-if [ -z "$MAVEN_SKIP_RC" ] ; then
-
- if [ -f /etc/mavenrc ] ; then
- . /etc/mavenrc
- fi
-
- if [ -f "$HOME/.mavenrc" ] ; then
- . "$HOME/.mavenrc"
- fi
-
-fi
-
-# OS specific support. $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-mingw=false
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- MINGW*) mingw=true;;
- Darwin*) darwin=true
- # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
- # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
- if [ -z "$JAVA_HOME" ]; then
- if [ -x "/usr/libexec/java_home" ]; then
- export JAVA_HOME="`/usr/libexec/java_home`"
- else
- export JAVA_HOME="/Library/Java/Home"
- fi
- fi
- ;;
-esac
-
-if [ -z "$JAVA_HOME" ] ; then
- if [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=`java-config --jre-home`
- fi
-fi
-
-if [ -z "$M2_HOME" ] ; then
- ## resolve links - $0 may be a link to maven's home
- PRG="$0"
-
- # need this for relative symlinks
- while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
- done
-
- saveddir=`pwd`
-
- M2_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- M2_HOME=`cd "$M2_HOME" && pwd`
-
- cd "$saveddir"
- # echo Using m2 at $M2_HOME
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --unix "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For Mingw, ensure paths are in UNIX format before anything is touched
-if $mingw ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME="`(cd "$M2_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
- # TODO classpath?
-fi
-
-if [ -z "$JAVA_HOME" ]; then
- javaExecutable="`which javac`"
- if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
- # readlink(1) is not available as standard on Solaris 10.
- readLink=`which readlink`
- if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
- if $darwin ; then
- javaHome="`dirname \"$javaExecutable\"`"
- javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
- else
- javaExecutable="`readlink -f \"$javaExecutable\"`"
- fi
- javaHome="`dirname \"$javaExecutable\"`"
- javaHome=`expr "$javaHome" : '\(.*\)/bin'`
- JAVA_HOME="$javaHome"
- export JAVA_HOME
- fi
- fi
-fi
-
-if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD="`which java`"
- fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly." >&2
- echo " We cannot execute $JAVACMD" >&2
- exit 1
-fi
-
-if [ -z "$JAVA_HOME" ] ; then
- echo "Warning: JAVA_HOME environment variable is not set."
-fi
-
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
-
-# traverses directory structure from process work directory to filesystem root
-# first directory with .mvn subdirectory is considered project base directory
-find_maven_basedir() {
-
- if [ -z "$1" ]
- then
- echo "Path not specified to find_maven_basedir"
- return 1
- fi
-
- basedir="$1"
- wdir="$1"
- while [ "$wdir" != '/' ] ; do
- if [ -d "$wdir"/.mvn ] ; then
- basedir=$wdir
- break
- fi
- # workaround for JBEAP-8937 (on Solaris 10/Sparc)
- if [ -d "${wdir}" ]; then
- wdir=`cd "$wdir/.."; pwd`
- fi
- # end of workaround
- done
- echo "${basedir}"
-}
-
-# concatenates all lines of a file
-concat_lines() {
- if [ -f "$1" ]; then
- echo "$(tr -s '\n' ' ' < "$1")"
- fi
-}
-
-BASE_DIR=`find_maven_basedir "$(pwd)"`
-if [ -z "$BASE_DIR" ]; then
- exit 1;
-fi
-
-##########################################################################################
-# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-# This allows using the maven wrapper in projects that prohibit checking in binary data.
-##########################################################################################
-if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found .mvn/wrapper/maven-wrapper.jar"
- fi
-else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
- fi
- jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
- while IFS="=" read key value; do
- case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
- esac
- done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Downloading from: $jarUrl"
- fi
- wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
-
- if command -v wget > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found wget ... using wget"
- fi
- wget "$jarUrl" -O "$wrapperJarPath"
- elif command -v curl > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found curl ... using curl"
- fi
- curl -o "$wrapperJarPath" "$jarUrl"
- else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Falling back to using Java to download"
- fi
- javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
- if [ -e "$javaClass" ]; then
- if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Compiling MavenWrapperDownloader.java ..."
- fi
- # Compiling the Java class
- ("$JAVA_HOME/bin/javac" "$javaClass")
- fi
- if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- # Running the downloader
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Running MavenWrapperDownloader.java ..."
- fi
- ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
- fi
- fi
- fi
-fi
-##########################################################################################
-# End of extension
-##########################################################################################
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-if [ "$MVNW_VERBOSE" = true ]; then
- echo $MAVEN_PROJECTBASEDIR
-fi
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --path --windows "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- [ -n "$MAVEN_PROJECTBASEDIR" ] &&
- MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
-fi
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
deleted file mode 100644
index e5cfb0ae..00000000
--- a/mvnw.cmd
+++ /dev/null
@@ -1,161 +0,0 @@
-@REM ----------------------------------------------------------------------------
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM ----------------------------------------------------------------------------
-
-@REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script
-@REM
-@REM Required ENV vars:
-@REM JAVA_HOME - location of a JDK home dir
-@REM
-@REM Optional ENV vars
-@REM M2_HOME - location of maven2's installed home dir
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
-@REM e.g. to debug Maven itself, use
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-@REM ----------------------------------------------------------------------------
-
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
-@echo off
-@REM set title of command window
-title %0
-@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
-@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
-
-@REM set %HOME% to equivalent of $HOME
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
-
-@REM Execute a user defined script before this one
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
-:skipRcPre
-
-@setlocal
-
-set ERROR_CODE=0
-
-@REM To isolate internal variables from possible post scripts, we use another setlocal
-@setlocal
-
-@REM ==== START VALIDATION ====
-if not "%JAVA_HOME%" == "" goto OkJHome
-
-echo.
-echo Error: JAVA_HOME not found in your environment. >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-:OkJHome
-if exist "%JAVA_HOME%\bin\java.exe" goto init
-
-echo.
-echo Error: JAVA_HOME is set to an invalid directory. >&2
-echo JAVA_HOME = "%JAVA_HOME%" >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-@REM ==== END VALIDATION ====
-
-:init
-
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
-@REM Fallback to current working directory if not found.
-
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
-
-set EXEC_DIR=%CD%
-set WDIR=%EXEC_DIR%
-:findBaseDir
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
-cd ..
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
-set WDIR=%CD%
-goto findBaseDir
-
-:baseDirFound
-set MAVEN_PROJECTBASEDIR=%WDIR%
-cd "%EXEC_DIR%"
-goto endDetectBaseDir
-
-:baseDirNotFound
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
-cd "%EXEC_DIR%"
-
-:endDetectBaseDir
-
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
-
-@setlocal EnableExtensions EnableDelayedExpansion
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
-
-:endReadAdditionalConfig
-
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
-FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
- IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
-)
-
-@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
-if exist %WRAPPER_JAR% (
- echo Found %WRAPPER_JAR%
-) else (
- echo Couldn't find %WRAPPER_JAR%, downloading it ...
- echo Downloading from: %DOWNLOAD_URL%
- powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
- echo Finished downloading %WRAPPER_JAR%
-)
-@REM End of extension
-
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-
-exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
index 9285505d..e0123131 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,14 +1,24 @@
-
4.0.0
me.zhengjie
eladmin
- v1.0
- jar
+ pom
+ 1.5
- elune
+
+ eladmin-common
+ eladmin-logging
+ eladmin-system
+ eladmin-tools
+ eladmin-generator
+
+
+ el-admin
+ http://auauz.net
org.springframework.boot
@@ -21,7 +31,13 @@
UTF-8
UTF-8
1.8
- 0.9.1
+ 2.9.0
+ 1.16
+ 2.9.2
+ 1.2.54
+ 1.1.10
+ [4.1.12,)
+ 2.5.0
1.2.0.Final
@@ -54,17 +70,12 @@
org.springframework.boot
spring-boot-starter-data-redis
-
-
-
- org.springframework.boot
- spring-boot-starter-websocket
-
-
-
-
- org.springframework.boot
- spring-boot-starter-freemarker
+
+
+ io.lettuce
+ lettuce-core
+
+
@@ -72,44 +83,39 @@
redis.clients
jedis
- 2.9.0
+ ${jedis.version}
org.apache.commons
commons-pool2
- 2.5.0
+ ${commons-pool2.version}
org.apache.commons
commons-lang3
-
-
- io.jsonwebtoken
- jjwt
- ${jjwt.version}
-
org.bgee.log4jdbc-log4j2
log4jdbc-log4j2-jdbc4.1
- 1.16
+ ${log4jdbc.version}
io.springfox
springfox-swagger2
- 2.9.2
+ ${swagger.version}
io.springfox
springfox-swagger-ui
- 2.9.2
+ ${swagger.version}
+
mysql
@@ -120,7 +126,7 @@
com.alibaba
druid-spring-boot-starter
- 1.1.10
+ ${druid.version}
@@ -129,18 +135,19 @@
lombok
true
+
cn.hutool
hutool-all
- [4.1.12,)
+ ${hutool.version}
com.alibaba
fastjson
- 1.2.54
+ ${fastjson.version}
@@ -159,56 +166,29 @@
javax.inject
1
-
-
-
- javax.mail
- mail
- 1.4.7
-
-
-
-
- com.qiniu
- qiniu-java-sdk
- [7.2.0, 7.2.99]
-
-
-
-
- com.alipay.sdk
- alipay-sdk-java
- 3.1.0
-
-
-
-
- commons-configuration
- commons-configuration
- 1.9
-
-
-
-
- org.quartz-scheduler
- quartz
-
- nexus-aliyun
- Nexus aliyun
- http://maven.aliyun.com/nexus/content/groups/public
+ public
+ aliyun nexus
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ true
+
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
+
+
+ public
+ aliyun nexus
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ true
+
+
+ false
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/me/zhengjie/common/utils/FtlUtil.java b/src/main/java/me/zhengjie/common/utils/FtlUtil.java
deleted file mode 100644
index 067ed55e..00000000
--- a/src/main/java/me/zhengjie/common/utils/FtlUtil.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package me.zhengjie.common.utils;
-
-import freemarker.template.Configuration;
-import java.io.FileOutputStream;
-
-/**
- * @author jie
- * @date 2019-01-03
- */
-public class FtlUtil {
-
- private static Configuration configuration;
- private static FileOutputStream fileOut = null;
-
- static {
- configuration=new Configuration(Configuration.VERSION_2_3_28);
- configuration.setDefaultEncoding("UTF-8");
- configuration.setClassForTemplateLoading(FtlUtil.class, "/template/generator");
- configuration.setClassForTemplateLoading(FtlUtil.class, "/template/email");
- }
-
- public static Configuration getConfig(){
- return configuration;
- }
-
-
-}
diff --git a/src/main/java/me/zhengjie/common/utils/IpUtil.java b/src/main/java/me/zhengjie/common/utils/IpUtil.java
deleted file mode 100644
index ed9076f6..00000000
--- a/src/main/java/me/zhengjie/common/utils/IpUtil.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package me.zhengjie.common.utils;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * 获取ip地址
- * @author X-rapido
- * @date 2018-11-24
- */
-public class IpUtil {
- public static String getIP(HttpServletRequest request) {
- String ip = request.getHeader("x-forwarded-for");
- if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
- ip = request.getHeader("Proxy-Client-IP");
- }
- if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
- ip = request.getHeader("WL-Proxy-Client-IP");
- }
- if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
- ip = request.getRemoteAddr();
- }
- return "0:0:0:0:0:0:0:1".equals(ip)?"127.0.0.1":ip;
- }
-}
diff --git a/src/main/java/me/zhengjie/common/utils/TimeUtil.java b/src/main/java/me/zhengjie/common/utils/TimeUtil.java
deleted file mode 100644
index 2b7fca93..00000000
--- a/src/main/java/me/zhengjie/common/utils/TimeUtil.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package me.zhengjie.common.utils;
-
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * @author jie
- * @date 2018-12-13
- *
- * 日期工具
- */
-public class TimeUtil {
-
- public static String getWeekDay(){
- String[] weekDays = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
- Calendar cal = Calendar.getInstance();
- cal.setTime(new Date());
-
- int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
- if (w < 0){
- w = 0;
- }
- return weekDays[w];
- }
-}
diff --git a/src/main/java/me/zhengjie/monitor/rest/LoggingController.java b/src/main/java/me/zhengjie/monitor/rest/LoggingController.java
deleted file mode 100644
index 20fb21b0..00000000
--- a/src/main/java/me/zhengjie/monitor/rest/LoggingController.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package me.zhengjie.monitor.rest;
-
-import me.zhengjie.monitor.domain.Logging;
-import me.zhengjie.monitor.service.query.LoggingQueryService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author jie
- * @date 2018-11-24
- */
-@RestController
-@RequestMapping("api")
-public class LoggingController {
-
- @Autowired
- private LoggingQueryService loggingQueryService;
-
- @GetMapping(value = "logs")
- @PreAuthorize("hasAnyRole('ADMIN','USER')")
- public ResponseEntity getLogs(Logging logging, Pageable pageable){
- return new ResponseEntity(loggingQueryService.queryAll(logging,pageable), HttpStatus.OK);
- }
-}