♻️ 重构代码,修复部分包名和类名命名问题,消灭部分Lombok警告
This commit is contained in:
1 parent
0ad67ddef7
commit
fbfc87b8d4
23 files changed
+39
-249
No files matched your search
+1
-1
@@ -35,7 +35,7 @@ import org.springframework.security.oauth2.client.resource.OAuth2ProtectedResour
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty("security.oauth2.client.client-id")
|
||||
public class PigxFeignClientIntercept {
|
||||
public class PigxFeignClientInterceptor {
|
||||
@Bean
|
||||
public RequestInterceptor oauth2FeignRequestInterceptor(OAuth2ClientContext oAuth2ClientContext,
|
||||
OAuth2ProtectedResourceDetails resource) {
|
||||
@@ -2,4 +2,4 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.pig4cloud.pigx.common.security.component.PermissionService,\
|
||||
com.pig4cloud.pigx.common.security.component.PigAccessDeniedHandler,\
|
||||
com.pig4cloud.pigx.common.security.component.ResourceAuthExceptionEntryPoint,\
|
||||
com.pig4cloud.pigx.common.security.interceptor.PigxFeignClientIntercept
|
||||
com.pig4cloud.pigx.common.security.interceptor.PigxFeignClientInterceptor
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
package com.pig4cloud.pigx.gateway.config;
|
||||
|
||||
import com.pig4cloud.pigx.gateway.handle.*;
|
||||
import com.pig4cloud.pigx.gateway.handler.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.gateway.handle;
|
||||
package com.pig4cloud.pigx.gateway.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.gateway.handle;
|
||||
package com.pig4cloud.pigx.gateway.handler;
|
||||
|
||||
import com.google.code.kaptcha.Producer;
|
||||
import com.pig4cloud.pigx.gateway.filter.ImageCodeGatewayFilter;
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.gateway.handle;
|
||||
package com.pig4cloud.pigx.gateway.handler;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -43,7 +43,7 @@ public class SwaggerResourceHandler implements HandlerFunction<ServerResponse> {
|
||||
/**
|
||||
* Handle the given request.
|
||||
*
|
||||
* @param request the request to handle
|
||||
* @param request the request to handler
|
||||
* @return the response
|
||||
*/
|
||||
@Override
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.gateway.handle;
|
||||
package com.pig4cloud.pigx.gateway.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -46,7 +46,7 @@ public class SwaggerSecurityHandler implements HandlerFunction<ServerResponse> {
|
||||
/**
|
||||
* Handle the given request.
|
||||
*
|
||||
* @param request the request to handle
|
||||
* @param request the request to handler
|
||||
* @return the response
|
||||
*/
|
||||
@Override
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.gateway.handle;
|
||||
package com.pig4cloud.pigx.gateway.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -46,7 +46,7 @@ public class SwaggerUiHandler implements HandlerFunction<ServerResponse> {
|
||||
/**
|
||||
* Handle the given request.
|
||||
*
|
||||
* @param request the request to handle
|
||||
* @param request the request to handler
|
||||
* @return the response
|
||||
*/
|
||||
@Override
|
||||
@@ -20,6 +20,7 @@
|
||||
package com.pig4cloud.pigx.admin.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
@@ -27,6 +28,7 @@ import lombok.Data;
|
||||
* 部门树
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeptTree extends TreeNode {
|
||||
private String name;
|
||||
}
|
||||
@@ -21,12 +21,14 @@ package com.pig4cloud.pigx.admin.api.dto;
|
||||
|
||||
import com.pig4cloud.pigx.admin.api.vo.MenuVO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2017年11月9日23:33:27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MenuTree extends TreeNode {
|
||||
private String icon;
|
||||
private String name;
|
||||
|
||||
@@ -21,6 +21,7 @@ package com.pig4cloud.pigx.admin.api.dto;
|
||||
|
||||
import com.pig4cloud.pigx.admin.api.entity.SysRole;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
@@ -28,6 +29,7 @@ import lombok.Data;
|
||||
* 角色Dto
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RoleDTO extends SysRole {
|
||||
/**
|
||||
* 角色部门Id
|
||||
|
||||
@@ -21,6 +21,7 @@ package com.pig4cloud.pigx.admin.api.dto;
|
||||
|
||||
import com.pig4cloud.pigx.admin.api.entity.SysUser;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,6 +30,7 @@ import java.util.List;
|
||||
* @date 2017/11/5
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserDTO extends SysUser {
|
||||
/**
|
||||
* 角色ID
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.annotations.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -39,6 +40,7 @@ import java.util.Date;
|
||||
* @since 2018-01-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_dept")
|
||||
public class SysDept extends Model<SysDept> {
|
||||
|
||||
|
||||
+2
@@ -22,6 +22,7 @@ package com.pig4cloud.pigx.admin.api.entity;
|
||||
import com.baomidou.mybatisplus.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -34,6 +35,7 @@ import java.io.Serializable;
|
||||
* @since 2018-01-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_dept_relation")
|
||||
public class SysDeptRelation extends Model<SysDeptRelation> {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.annotations.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
@@ -40,6 +41,7 @@ import java.util.Date;
|
||||
* @since 2017-11-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_dict")
|
||||
public class SysDict extends Model<SysDict> {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.annotations.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -39,6 +40,7 @@ import java.util.Date;
|
||||
* @since 2017-11-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_menu")
|
||||
public class SysMenu extends Model<SysMenu> {
|
||||
|
||||
|
||||
+4
-105
@@ -24,6 +24,8 @@ import com.baomidou.mybatisplus.annotations.TableField;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -35,6 +37,8 @@ import java.io.Serializable;
|
||||
* @author lengleng
|
||||
* @since 2018-05-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_oauth_client_details")
|
||||
public class SysOauthClientDetails extends Model<SysOauthClientDetails> {
|
||||
|
||||
@@ -60,114 +64,9 @@ public class SysOauthClientDetails extends Model<SysOauthClientDetails> {
|
||||
private String additionalInformation;
|
||||
private String autoapprove;
|
||||
|
||||
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getResourceIds() {
|
||||
return resourceIds;
|
||||
}
|
||||
|
||||
public void setResourceIds(String resourceIds) {
|
||||
this.resourceIds = resourceIds;
|
||||
}
|
||||
|
||||
public String getClientSecret() {
|
||||
return clientSecret;
|
||||
}
|
||||
|
||||
public void setClientSecret(String clientSecret) {
|
||||
this.clientSecret = clientSecret;
|
||||
}
|
||||
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
public String getAuthorizedGrantTypes() {
|
||||
return authorizedGrantTypes;
|
||||
}
|
||||
|
||||
public void setAuthorizedGrantTypes(String authorizedGrantTypes) {
|
||||
this.authorizedGrantTypes = authorizedGrantTypes;
|
||||
}
|
||||
|
||||
public String getWebServerRedirectUri() {
|
||||
return webServerRedirectUri;
|
||||
}
|
||||
|
||||
public void setWebServerRedirectUri(String webServerRedirectUri) {
|
||||
this.webServerRedirectUri = webServerRedirectUri;
|
||||
}
|
||||
|
||||
public String getAuthorities() {
|
||||
return authorities;
|
||||
}
|
||||
|
||||
public void setAuthorities(String authorities) {
|
||||
this.authorities = authorities;
|
||||
}
|
||||
|
||||
public Integer getAccessTokenValidity() {
|
||||
return accessTokenValidity;
|
||||
}
|
||||
|
||||
public void setAccessTokenValidity(Integer accessTokenValidity) {
|
||||
this.accessTokenValidity = accessTokenValidity;
|
||||
}
|
||||
|
||||
public Integer getRefreshTokenValidity() {
|
||||
return refreshTokenValidity;
|
||||
}
|
||||
|
||||
public void setRefreshTokenValidity(Integer refreshTokenValidity) {
|
||||
this.refreshTokenValidity = refreshTokenValidity;
|
||||
}
|
||||
|
||||
public String getAdditionalInformation() {
|
||||
return additionalInformation;
|
||||
}
|
||||
|
||||
public void setAdditionalInformation(String additionalInformation) {
|
||||
this.additionalInformation = additionalInformation;
|
||||
}
|
||||
|
||||
public String getAutoapprove() {
|
||||
return autoapprove;
|
||||
}
|
||||
|
||||
public void setAutoapprove(String autoapprove) {
|
||||
this.autoapprove = autoapprove;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.clientId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SysOauthClientDetails{" +
|
||||
", clientId=" + clientId +
|
||||
", resourceIds=" + resourceIds +
|
||||
", clientSecret=" + clientSecret +
|
||||
", scope=" + scope +
|
||||
", authorizedGrantTypes=" + authorizedGrantTypes +
|
||||
", webServerRedirectUri=" + webServerRedirectUri +
|
||||
", authorities=" + authorities +
|
||||
", accessTokenValidity=" + accessTokenValidity +
|
||||
", refreshTokenValidity=" + refreshTokenValidity +
|
||||
", additionalInformation=" + additionalInformation +
|
||||
", autoapprove=" + autoapprove +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
+2
-12
@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.annotations.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -39,6 +40,7 @@ import java.util.Date;
|
||||
* @since 2017-10-29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_role")
|
||||
public class SysRole extends Model<SysRole> {
|
||||
|
||||
@@ -68,16 +70,4 @@ public class SysRole extends Model<SysRole> {
|
||||
return this.roleId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SysRole{" +
|
||||
", roleId=" + roleId +
|
||||
", roleName=" + roleName +
|
||||
", roleCode=" + roleCode +
|
||||
", roleDesc=" + roleDesc +
|
||||
", createTime=" + createTime +
|
||||
", updateTime=" + updateTime +
|
||||
", delFlag=" + delFlag +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
+2
@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -37,6 +38,7 @@ import java.io.Serializable;
|
||||
* @since 2018-01-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_role_dept")
|
||||
public class SysRoleDept extends Model<SysRoleDept> {
|
||||
|
||||
|
||||
+2
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -36,6 +37,7 @@ import java.io.Serializable;
|
||||
* @since 2017-10-29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_role_menu")
|
||||
public class SysRoleMenu extends Model<SysRoleMenu> {
|
||||
|
||||
|
||||
-15
@@ -92,19 +92,4 @@ public class SysUser implements Serializable {
|
||||
@TableField("dept_id")
|
||||
private Integer deptId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SysUser{" +
|
||||
"userId=" + userId +
|
||||
", username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
", salt='" + salt + '\'' +
|
||||
", createTime=" + createTime +
|
||||
", updateTime=" + updateTime +
|
||||
", delFlag='" + delFlag + '\'' +
|
||||
", phone='" + phone + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", deptId=" + deptId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
+2
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -36,6 +37,7 @@ import java.io.Serializable;
|
||||
* @since 2017-10-29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_user_role")
|
||||
public class SysUserRole extends Model<SysUserRole> {
|
||||
|
||||
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.admin.api.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotations.TableField;
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 动态路由配置表
|
||||
* </p>
|
||||
*
|
||||
* @author lengleng
|
||||
* @since 2018-05-15
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_zuul_route")
|
||||
public class SysZuulRoute extends Model<SysZuulRoute> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* router Id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 路由路径
|
||||
*/
|
||||
private String path;
|
||||
/**
|
||||
* 服务名称
|
||||
*/
|
||||
@TableField("service_id")
|
||||
private String serviceId;
|
||||
/**
|
||||
* url代理
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 转发去掉前缀
|
||||
*/
|
||||
@TableField("strip_prefix")
|
||||
private String stripPrefix;
|
||||
/**
|
||||
* 是否重试
|
||||
*/
|
||||
private String retryable;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String enabled;
|
||||
/**
|
||||
* 敏感请求头
|
||||
*/
|
||||
@TableField("sensitiveHeaders_list")
|
||||
private String sensitiveheadersList;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 删除标识(0-正常,1-删除)
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user