[代码完善]移除无用包 (#522)

pull/530/head
SnailClimb 2020-11-15 19:42:01 +08:00 committed by GitHub
parent aab6beffc0
commit 5e95ae5bf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 7 additions and 28 deletions

View File

@ -24,7 +24,6 @@ import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*; import org.springframework.data.redis.core.*;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;

View File

@ -10,7 +10,7 @@ public class DateUtilsTest {
public void test1() { public void test1() {
long l = System.currentTimeMillis() / 1000; long l = System.currentTimeMillis() / 1000;
LocalDateTime localDateTime = DateUtil.fromTimeStamp(l); LocalDateTime localDateTime = DateUtil.fromTimeStamp(l);
System.out.printf(DateUtil.localDateTimeFormatyMdHms(localDateTime)); System.out.print(DateUtil.localDateTimeFormatyMdHms(localDateTime));
} }
@Test @Test

View File

@ -17,7 +17,6 @@ package me.zhengjie.service.impl;
import cn.hutool.core.lang.Dict; import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.Log; import me.zhengjie.domain.Log;

View File

@ -18,8 +18,6 @@ package me.zhengjie.modules.mnt.repository;
import me.zhengjie.modules.mnt.domain.ServerDeploy; import me.zhengjie.modules.mnt.domain.ServerDeploy;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
/** /**
* @author zhanghouying * @author zhanghouying

View File

@ -15,7 +15,6 @@
*/ */
package me.zhengjie.modules.mnt.util; package me.zhengjie.modules.mnt.util;
import cn.hutool.crypto.SecureUtil;
import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.util.StringUtils; import com.alibaba.druid.util.StringUtils;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;

View File

@ -131,8 +131,7 @@ public class ZipUtils {
for (Enumeration<?> entries = zf.entries(); entries.hasMoreElements(); ) { for (Enumeration<?> entries = zf.entries(); entries.hasMoreElements(); ) {
ZipEntry entry = ((ZipEntry) entries.nextElement()); ZipEntry entry = ((ZipEntry) entries.nextElement());
InputStream in = zf.getInputStream(entry); InputStream in = zf.getInputStream(entry);
String str = folderPath; File desFile = new File(folderPath, java.net.URLEncoder.encode(entry.getName(), "UTF-8"));
File desFile = new File(str, java.net.URLEncoder.encode(entry.getName(), "UTF-8"));
if (!desFile.exists()) { if (!desFile.exists()) {
File fileParentDir = desFile.getParentFile(); File fileParentDir = desFile.getParentFile();

View File

@ -27,7 +27,7 @@ import java.util.concurrent.Callable;
* @author / * @author /
*/ */
@Slf4j @Slf4j
public class QuartzRunnable implements Callable { public class QuartzRunnable implements Callable<Object> {
private final Object target; private final Object target;
private final Method method; private final Method method;

View File

@ -16,8 +16,6 @@
package me.zhengjie.modules.security.config.bean; package me.zhengjie.modules.security.config.bean;
import lombok.Data; import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/** /**
* Jwt * Jwt

View File

@ -21,7 +21,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.zhengjie.annotation.Log;
import me.zhengjie.annotation.rest.AnonymousDeleteMapping; import me.zhengjie.annotation.rest.AnonymousDeleteMapping;
import me.zhengjie.annotation.rest.AnonymousGetMapping; import me.zhengjie.annotation.rest.AnonymousGetMapping;
import me.zhengjie.annotation.rest.AnonymousPostMapping; import me.zhengjie.annotation.rest.AnonymousPostMapping;

View File

@ -22,7 +22,6 @@ import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.Serializable;
/** /**
* @author Zheng Jie * @author Zheng Jie

View File

@ -24,7 +24,6 @@ import me.zhengjie.modules.system.service.DataService;
import me.zhengjie.modules.system.service.RoleService; import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.UserService; import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.modules.system.service.dto.UserDto; import me.zhengjie.modules.system.service.dto.UserDto;
import org.springframework.http.HttpStatus;
import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@ -20,8 +20,6 @@ import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseEntity; import me.zhengjie.base.BaseEntity;
import javax.persistence.*; import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;

View File

@ -20,12 +20,10 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseEntity; import me.zhengjie.base.BaseEntity;
import org.hibernate.annotations.CreationTimestamp;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;

View File

@ -21,12 +21,11 @@ import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseEntity; import me.zhengjie.base.BaseEntity;
import me.zhengjie.utils.enums.DataScopeEnum; import me.zhengjie.utils.enums.DataScopeEnum;
import org.hibernate.annotations.CreationTimestamp;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;

View File

@ -26,7 +26,6 @@ import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.dto.DeptDto; import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria; import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.utils.PageUtil; import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.ThrowableUtil;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;

View File

@ -33,7 +33,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@ -23,7 +23,6 @@ import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Job; import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.service.JobService; import me.zhengjie.modules.system.service.JobService;
import me.zhengjie.modules.system.service.dto.JobQueryCriteria; import me.zhengjie.modules.system.service.dto.JobQueryCriteria;
import me.zhengjie.utils.ThrowableUtil;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.system.service;
import me.zhengjie.modules.system.domain.Menu; import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.service.dto.MenuDto; import me.zhengjie.modules.system.service.dto.MenuDto;
import me.zhengjie.modules.system.service.dto.MenuQueryCriteria; import me.zhengjie.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;

View File

@ -19,7 +19,6 @@ import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.base.BaseDTO; import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
/** /**
* @author Zheng Jie * @author Zheng Jie

View File

@ -21,7 +21,6 @@ import lombok.Setter;
import me.zhengjie.base.BaseDTO; import me.zhengjie.base.BaseDTO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
/** /**
* @author Zheng Jie * @author Zheng Jie

View File

@ -50,6 +50,7 @@ public class MonitorServiceImpl implements MonitorService {
HardwareAbstractionLayer hal = si.getHardware(); HardwareAbstractionLayer hal = si.getHardware();
// 系统信息 // 系统信息
resultMap.put("sys", getSystemInfo(os)); resultMap.put("sys", getSystemInfo(os));
// cpu 信息 // cpu 信息
resultMap.put("cpu", getCpuInfo(hal.getProcessor())); resultMap.put("cpu", getCpuInfo(hal.getProcessor()));
// 内存信息 // 内存信息

View File

@ -17,7 +17,6 @@ package me.zhengjie.service;
import me.zhengjie.domain.vo.EmailVo; import me.zhengjie.domain.vo.EmailVo;
import me.zhengjie.domain.EmailConfig; import me.zhengjie.domain.EmailConfig;
import org.springframework.scheduling.annotation.Async;
/** /**
* @author Zheng Jie * @author Zheng Jie