开启 Dubbo Provider 参数校验
This commit is contained in:
parent
d619f0fae8
commit
26ea8dd907
@ -41,6 +41,7 @@ public class PassportManager {
|
||||
|
||||
public PassportAccessTokenVO login(PassportLoginDTO loginDTO, String ip) {
|
||||
// 校验管理员密码
|
||||
// CommonResult<AdminVO> verifyPasswordResult = adminRpc.verifyPassword(AdminPassportConvert.INSTANCE.convert(loginDTO).setIp(ip));
|
||||
CommonResult<AdminVO> verifyPasswordResult = adminRpc.verifyPassword(AdminPassportConvert.INSTANCE.convert(loginDTO).setIp(ip));
|
||||
verifyPasswordResult.checkError();
|
||||
// 创建访问令牌
|
||||
|
2
pom.xml
2
pom.xml
@ -35,7 +35,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<springboot.version>2.2.4.RELEASE</springboot.version>
|
||||
<springboot.version>2.2.5.RELEASE</springboot.version>
|
||||
<spring-boot-admin-starter-client.version>2.2.2</spring-boot-admin-starter-client.version>
|
||||
<!-- <com.alibab.dubbo.version>2.6.5</com.alibab.dubbo.version>-->
|
||||
<dubbo.version>2.7.4.1</dubbo.version>
|
||||
|
@ -54,6 +54,11 @@
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -33,6 +33,7 @@ dubbo:
|
||||
# Dubbo 服务提供者的配置
|
||||
provider:
|
||||
filter: -exception
|
||||
validation: true # 开启 Provider 参数校验
|
||||
OAuth2Rpc:
|
||||
version: 1.0.0
|
||||
AdminRpc:
|
||||
|
@ -54,6 +54,10 @@
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
|
@ -33,6 +33,7 @@ dubbo:
|
||||
# Dubbo 服务提供者的配置
|
||||
provider:
|
||||
filter: -exception
|
||||
validation: true # 开启 Provider 参数校验
|
||||
UserRpc:
|
||||
version: 1.0.0
|
||||
UserSmsCodeRpc:
|
||||
|
Loading…
Reference in New Issue
Block a user