From d90d493d4445d1d18526175f74be1c96b9d0a5e8 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 23 Jul 2024 11:34:56 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-114391=20=E3=80=90=E5=BE=AE=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=80=82=E9=85=8D=E3=80=91=E8=BF=9C=E7=A8=8B&?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=83=BD=E5=A4=9F?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E5=90=AF=E5=8A=A8=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boot/init/DesignWorkContextComponent.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java index 2c01bcd005..ee93d96369 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java @@ -8,8 +8,10 @@ import com.fanruan.carina.annotions.Stop; import com.fanruan.carina.annotions.Supplemental; import com.fanruan.plugin.autonomy.AutonomyClassManagerGroup; import com.fanruan.workplace.conetxt.CompatiblePool; +import com.fanruan.workplace.http.HttpConstants; import com.fanruan.workplace.http.RepositoryManager; import com.fanruan.workplace.http.WorkspaceHeartBeatShell; +import com.fanruan.workplace.http.exception.RemoteExceptionConvert; import com.fanruan.workplace.standard.ServerInfo; import com.fanruan.workplace.standard.ServerInfoOperator; import com.fr.base.io.FileAssistUtils; @@ -41,6 +43,10 @@ import com.fr.workspace.engine.FineWorkspaceFactory; import com.fr.workspace.engine.base.FineObjectPool; import com.fr.workspace.engine.client.heartbeart.FineWorkspaceHeartbeat; import com.fr.workspace.engine.client.heartbeart.WorkspaceHeartbeat; +import com.fr.workspace.engine.exception.RemoteDesignNoAuthException; +import com.fr.workspace.engine.exception.RemoteDesignPasswordNeedUpdateException; +import com.fr.workspace.engine.exception.RemoteDesignPasswordStrengthException; +import com.fr.workspace.engine.exception.RemoteDesignUserPwdErrorException; import com.fr.workspace.engine.resource.FineWorkResource; import com.fr.workspace.engine.resource.FineWorkResourceAdaptor; import com.fr.workspace.pool.WorkRPCRegister; @@ -111,6 +117,7 @@ public class DesignWorkContextComponent { WorkContext.setWorkResource(new FineWorkResourceAdaptor()); WorkContext.setVersion(VERSION_NUM + "#" + ServiceContext.group(WorkspaceKey.class).getAll().size()); + startErrorConvert(); } @@ -135,6 +142,15 @@ public class DesignWorkContextComponent { } } + + private void startErrorConvert() { + RemoteExceptionConvert.registerException(HttpConstants.USER_PWD_ERROR_CODE, new RemoteDesignUserPwdErrorException()); + RemoteExceptionConvert.registerException(HttpConstants.USER_PWD_NEED_UPDATE, new RemoteDesignPasswordNeedUpdateException()); + RemoteExceptionConvert.registerException(HttpConstants.PASSWORD_STRENGTH_ERROR_CODE, new RemoteDesignPasswordStrengthException()); + RemoteExceptionConvert.registerException(HttpConstants.REMOTE_AUTHORITY_ERROR_CODE, new RemoteDesignNoAuthException()); + RemoteExceptionConvert.registerException(HttpConstants.PASSWORD_EMPTY_ERROR_CODE, new RemoteDesignUserPwdErrorException()); + } + private void supplementalCommon() { Carina.getApplicationContext().singleton(WorkspaceHeartBeatShell.class).set(new FineWorkspaceHeartbeat()); Carina.getApplicationContext().group(WorkspaceKey.class).addAll(