diff --git a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/passport/PassportManager.java b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/passport/PassportManager.java index c648533fd..fef6f628a 100644 --- a/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/passport/PassportManager.java +++ b/management-web-app/src/main/java/cn/iocoder/mall/managementweb/manager/passport/PassportManager.java @@ -41,6 +41,7 @@ public class PassportManager { public PassportAccessTokenVO login(PassportLoginDTO loginDTO, String ip) { // 校验管理员密码 +// CommonResult verifyPasswordResult = adminRpc.verifyPassword(AdminPassportConvert.INSTANCE.convert(loginDTO).setIp(ip)); CommonResult verifyPasswordResult = adminRpc.verifyPassword(AdminPassportConvert.INSTANCE.convert(loginDTO).setIp(ip)); verifyPasswordResult.checkError(); // 创建访问令牌 diff --git a/pom.xml b/pom.xml index d434b6539..b33dd81b1 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ pom - 2.2.4.RELEASE + 2.2.5.RELEASE 2.2.2 2.7.4.1 diff --git a/system-service-project/system-service-app/pom.xml b/system-service-project/system-service-app/pom.xml index 506947a42..2cb932c0c 100644 --- a/system-service-project/system-service-app/pom.xml +++ b/system-service-project/system-service-app/pom.xml @@ -54,6 +54,11 @@ + + org.springframework.boot + spring-boot-starter-validation + + org.projectlombok lombok diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/AdminRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/AdminRpcImpl.java index 4e25829b8..a8b8d8356 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/AdminRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/AdminRpcImpl.java @@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; import static cn.iocoder.common.framework.vo.CommonResult.success; -@Service(version = "${dubbo.provider.AdminRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.AdminRpc.version}") public class AdminRpcImpl implements AdminRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/DepartmentRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/DepartmentRpcImpl.java index 4ceeaabbf..55241e23b 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/DepartmentRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/admin/DepartmentRpcImpl.java @@ -16,7 +16,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; /** * 部门 Rpc 实现类 */ -@Service(version = "${dubbo.provider.DepartmentRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.DepartmentRpc.version}") public class DepartmentRpcImpl implements DepartmentRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/datadict/DataDictRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/datadict/DataDictRpcImpl.java index faa15b80b..337805a4b 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/datadict/DataDictRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/datadict/DataDictRpcImpl.java @@ -15,7 +15,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; /** * 数据字典 Rpc 实现类 */ -@Service(version = "${dubbo.provider.DataDictRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.DataDictRpc.version}") public class DataDictRpcImpl implements DataDictRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/oauth/OAuth2RpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/oauth/OAuth2RpcImpl.java index dbe050812..c2a055b44 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/oauth/OAuth2RpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/oauth/OAuth2RpcImpl.java @@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; import static cn.iocoder.common.framework.vo.CommonResult.success; -@Service(version = "${dubbo.provider.OAuth2Rpc.version}", validation = "false") +@Service(version = "${dubbo.provider.OAuth2Rpc.version}") public class OAuth2RpcImpl implements OAuth2Rpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/PermissionRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/PermissionRpcImpl.java index e17cd9cc7..88d0264ba 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/PermissionRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/PermissionRpcImpl.java @@ -17,7 +17,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; /** * 权限 Rpc 实现类 */ -@Service(version = "${dubbo.provider.PermissionRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.PermissionRpc.version}") public class PermissionRpcImpl implements PermissionRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/ResourceRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/ResourceRpcImpl.java index cd04d3c8b..feb5be727 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/ResourceRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/ResourceRpcImpl.java @@ -16,7 +16,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; /** * 资源 Rpc 实现类 */ -@Service(version = "${dubbo.provider.ResourceRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.ResourceRpc.version}") public class ResourceRpcImpl implements ResourceRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/RoleRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/RoleRpcImpl.java index d45965881..fc640c7b8 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/RoleRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/permission/RoleRpcImpl.java @@ -19,7 +19,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; /** * 角色 Rpc 实现类 */ -@Service(version = "${dubbo.provider.RoleRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.RoleRpc.version}") public class RoleRpcImpl implements RoleRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemAccessLogRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemAccessLogRpcImpl.java index e3be8ddd3..59dcd5e9e 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemAccessLogRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemAccessLogRpcImpl.java @@ -14,7 +14,7 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; /** * 系统访问日志 Rpc 实现类 */ -@Service(version = "${dubbo.provider.SystemAccessLogRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.SystemAccessLogRpc.version}") public class SystemAccessLogRpcImpl implements SystemAccessLogRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemExceptionLogRpcImpl.java b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemExceptionLogRpcImpl.java index 81647f7fe..ce50a075b 100644 --- a/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemExceptionLogRpcImpl.java +++ b/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/rpc/systemlog/SystemExceptionLogRpcImpl.java @@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import static cn.iocoder.common.framework.vo.CommonResult.success; -@Service(version = "${dubbo.provider.SystemExceptionLogRpc.version}", validation = "false") +@Service(version = "${dubbo.provider.SystemExceptionLogRpc.version}") public class SystemExceptionLogRpcImpl implements SystemExceptionLogRpc { @Autowired diff --git a/system-service-project/system-service-app/src/main/resources/application.yaml b/system-service-project/system-service-app/src/main/resources/application.yaml index 823916a1f..a7379fef4 100644 --- a/system-service-project/system-service-app/src/main/resources/application.yaml +++ b/system-service-project/system-service-app/src/main/resources/application.yaml @@ -33,6 +33,7 @@ dubbo: # Dubbo 服务提供者的配置 provider: filter: -exception + validation: true # 开启 Provider 参数校验 OAuth2Rpc: version: 1.0.0 AdminRpc: diff --git a/user-service-project/user-service-app/pom.xml b/user-service-project/user-service-app/pom.xml index 52d13a255..6452806f2 100644 --- a/user-service-project/user-service-app/pom.xml +++ b/user-service-project/user-service-app/pom.xml @@ -54,6 +54,10 @@ + + org.springframework.boot + spring-boot-starter-validation + org.projectlombok lombok diff --git a/user-service-project/user-service-app/src/main/resources/application.yaml b/user-service-project/user-service-app/src/main/resources/application.yaml index 774ddf2d7..7ec437ce3 100644 --- a/user-service-project/user-service-app/src/main/resources/application.yaml +++ b/user-service-project/user-service-app/src/main/resources/application.yaml @@ -33,6 +33,7 @@ dubbo: # Dubbo 服务提供者的配置 provider: filter: -exception + validation: true # 开启 Provider 参数校验 UserRpc: version: 1.0.0 UserSmsCodeRpc: