moremind commented on code in PR #5604:
URL: https://github.com/apache/shenyu/pull/5604#discussion_r1703278101


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/SelectorServiceImpl.java:
##########
@@ -173,10 +175,12 @@ public String registerDefault(final SelectorDTO 
selectorDTO) {
     @Override
     public String registerDefault(final MetaDataRegisterDTO dto, final String 
pluginName, final String selectorHandler) {
         String contextPath = 
ContextPathUtils.buildContextPath(dto.getContextPath(), dto.getAppName());
-        SelectorDO selectorDO = findByNameAndPluginName(contextPath, 
pluginName);
+        // todo:[To be refactored with namespace]  Temporarily  hardcode
+        SelectorDO selectorDO = findByNameAndPluginName(contextPath, 
pluginName, SYS_DEFAULT_NAMESPACE_NAMESPACE_ID);
         if (Objects.isNull(selectorDO)) {
             SelectorDTO selectorDTO = 
SelectorUtil.buildSelectorDTO(contextPath, 
pluginMapper.selectByName(pluginName).getId());
             selectorDTO.setHandle(selectorHandler);
+            selectorDTO.setNamespaceId(SYS_DEFAULT_NAMESPACE_NAMESPACE_ID);

Review Comment:
   shenyu client must add shenyu namespace id, you should get the namespace 
from shenyu-client, if it's null, you should use the default.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to