This is an automated email from the ASF dual-hosted git repository.

likeguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new d03d5c3b1 [ISSUE #3964] Create Plugin Permissions Resource (#3986)
d03d5c3b1 is described below

commit d03d5c3b1abe0cd66620e9a4e3de65c280d7ad66
Author: nuo-promise <[email protected]>
AuthorDate: Thu Sep 22 19:38:15 2022 +0800

    [ISSUE #3964] Create Plugin Permissions Resource (#3986)
    
    * #3964 Create Plugin Permissions Resource
    
    * #3964 Create Plugin Permissions Resource Complete
    
    * resolve checkstyle
---
 db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql           |  4 +++
 db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql          |  5 +++
 db/upgrade/2.5.0-upgrade-2.5.1-pg.sql              |  3 ++
 .../shenyu/admin/controller/PluginController.java  | 18 +++++++++-
 .../apache/shenyu/admin/mapper/ResourceMapper.java |  8 +++++
 .../apache/shenyu/admin/service/PluginService.java |  9 ++++-
 .../admin/service/impl/PluginServiceImpl.java      | 14 +++++++-
 .../admin/service/impl/ResourceServiceImpl.java    |  3 ++
 .../src/main/resources/mappers/resouce-sqlmap.xml  |  6 ++++
 .../src/main/resources/sql-script/h2/schema.sql    |  2 ++
 .../{index.6c35abcb.css => index.5d736e5c.css}     |  4 +--
 .../src/main/resources/static/index.a0c1819b.js    |  1 -
 .../src/main/resources/static/index.adcea31f.js    |  1 +
 shenyu-admin/src/main/resources/static/index.html  | 40 +++++++++++-----------
 .../shenyu/common/constant/AdminConstants.java     |  5 +++
 15 files changed, 97 insertions(+), 26 deletions(-)

diff --git a/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql 
b/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql
index 5cc96004f..c0a6136a5 100644
--- a/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql
+++ b/db/upgrade/2.5.0-upgrade-2.5.1-mysql.sql
@@ -85,3 +85,7 @@ INSERT INTO `plugin_handle` VALUES ('1529402613204172742', 
'8', 'loadBalance', '
 
 INSERT INTO `plugin_handle` VALUES ('1529402613204172743', '10', 
'flowRuleEnable', 'flowRuleMaxQueueingTimeMs', 1, 2, 6, 
'{\"required\":\"0\",\"defaultValue\":\"500\"}', '2022-05-25 18:02:53', 
'2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172744', '10', 
'flowRuleEnable', 'flowRuleWarmUpPeriodSec', 1, 2, 6, 
'{\"required\":\"0\",\"defaultValue\":\"10\"}', '2022-05-25 18:02:53', 
'2022-05-25 18:02:53');
+
+/*create plugin resource and permission for admin #3964 */
+INSERT INTO "resource" VALUES 
('1572525965625266176','1346777449787125760','SHENYU.BUTTON.SYSTEM.RESOURCE','','','','2','6','','1','0','system:plugin:resource','1');
+INSERT INTO "permission" VALUES ('1572525965658820608', '1346358560427216896', 
'1572525965625266176');
diff --git a/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql 
b/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql
index e4f68b35c..ee1f1018b 100644
--- a/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql
+++ b/db/upgrade/2.5.0-upgrade-2.5.1-oracle.sql
@@ -170,3 +170,8 @@ values ('1518229897214468228', '10', 
'flowRuleMaxQueueingTimeMs', 'flowRuleMaxQu
 insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) 
*/ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, 
EXT_OBJ)
 values ('1518229897214468229', '10', 'flowRuleWarmUpPeriodSec', 
'flowRuleWarmUpPeriodSec', 1, 2, 8, '{"required":"0","defaultValue":"10"}');
 
+/*create plugin resource and permission for admin #3964 */
+insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX("resource" (id)) */ INTO resource  (id, 
parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, 
is_route, perms, status)
+values 
('1572525965625266176','1346777449787125760','SHENYU.BUTTON.SYSTEM.RESOURCE','','','','2','6','','1','0','system:plugin:resource','1');
+insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX (permission(id)) */ INTO permission (id, 
object_id, resource_id)
+VALUES ('1572525965658820608', '1346358560427216896', '1572525965625266176');
diff --git a/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql 
b/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql
index 1bb20fbc7..700534d74 100644
--- a/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql
+++ b/db/upgrade/2.5.0-upgrade-2.5.1-pg.sql
@@ -88,3 +88,6 @@ INSERT INTO "public"."plugin_handle" VALUES 
('1529402613204172802', '8', 'loadBa
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204172803', '10', 
'flowRuleMaxQueueingTimeMs', 'flowRuleMaxQueueingTimeMs', 1, 2, 6, 
'{"required":"0","defaultValue":"500"}', '2022-06-30 21:00:00', '2022-06-30 
21:00:00');
 INSERT INTO "public"."plugin_handle" VALUES ('1529402613204172804', '10', 
'flowRuleWarmUpPeriodSec', 'flowRuleWarmUpPeriodSec', 1, 2, 6, 
'{"required":"0","defaultValue":"10"}', '2022-06-30 21:00:00', '2022-06-30 
21:00:00');
 
+/*create plugin resource and permission for admin #3964 */
+INSERT INTO "public"."resource" VALUES 
('1572525965625266176','1346777449787125760','SHENYU.BUTTON.SYSTEM.RESOURCE','','','','2','6','','1','0','system:plugin:resource','1');
+INSERT INTO "public"."permission" VALUES ('1572525965658820608', 
'1346358560427216896', '1572525965625266176');
diff --git 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/PluginController.java
 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/PluginController.java
index 15a0eaca9..a14ad33d7 100644
--- 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/PluginController.java
+++ 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/PluginController.java
@@ -139,7 +139,23 @@ public class PluginController implements 
PagedController<PluginQueryCondition, P
         pluginDTO.setId(id);
         return createPlugin(pluginDTO);
     }
-    
+
+    /**
+     * create plugin resource.
+     * @param id primary key
+     * @param pluginDTO plugin
+     * @return {@linkplain ShenyuAdminResult}
+     */
+    @PutMapping("/createPluginResource/{id}")
+    @RequiresPermissions("system:plugin:resource")
+    public ShenyuAdminResult createPluginResource(@PathVariable("id")
+                                                  @Existed(message = "plugin 
is not existed",
+                                                          provider = 
PluginMapper.class) final String id,
+                                                  @Valid @RequestBody final 
PluginDTO pluginDTO) {
+        pluginDTO.setId(id);
+        return 
ShenyuAdminResult.success(pluginService.createPluginResource(pluginDTO));
+    }
+
     /**
      * delete plugins.
      *
diff --git 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/mapper/ResourceMapper.java 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/mapper/ResourceMapper.java
index 6db7fd553..3ca2dd1fd 100644
--- 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/mapper/ResourceMapper.java
+++ 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/mapper/ResourceMapper.java
@@ -169,4 +169,12 @@ public interface ResourceMapper extends ExistProvider {
      * @return {@linkplain List}
      */
     List<ResourceDO> selectAll();
+
+    /**
+     * resource existed.
+     *
+     * @param name name
+     * @return existed
+     */
+    Boolean nameExisted(@Param("name") Serializable name);
 }
diff --git 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/PluginService.java 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/PluginService.java
index c8e166985..fc9bdb01f 100644
--- 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/PluginService.java
+++ 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/PluginService.java
@@ -32,7 +32,7 @@ import java.util.List;
  * this is plugin service.
  */
 public interface PluginService extends PageService<PluginQueryCondition, 
PluginVO> {
-    
+
     /**
      * Create or update string.
      *
@@ -40,6 +40,13 @@ public interface PluginService extends 
PageService<PluginQueryCondition, PluginV
      * @return the string
      */
     String createOrUpdate(PluginDTO pluginDTO);
+
+    /**
+     * create plugin resource.
+     * @param pluginDTO the plugin dto
+     * @return the string
+     */
+    String createPluginResource(PluginDTO pluginDTO);
     
     /**
      * Delete string.
diff --git 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/PluginServiceImpl.java
 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/PluginServiceImpl.java
index d2f058089..bd52c2ea2 100644
--- 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/PluginServiceImpl.java
+++ 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/PluginServiceImpl.java
@@ -79,7 +79,19 @@ public class PluginServiceImpl implements PluginService {
     public String createOrUpdate(final PluginDTO pluginDTO) {
         return StringUtils.isBlank(pluginDTO.getId()) ? this.create(pluginDTO) 
: this.update(pluginDTO);
     }
-    
+
+    /**
+     * create plugin resource.
+     *
+     * @param pluginDTO the plugin dto
+     * @return result message
+     */
+    @Override
+    public String createPluginResource(final PluginDTO pluginDTO) {
+        pluginEventPublisher.onCreated(PluginDO.buildPluginDO(pluginDTO));
+        return ShenyuResultMessage.CREATE_SUCCESS;
+    }
+
     /**
      * delete plugins.
      *
diff --git 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ResourceServiceImpl.java
 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ResourceServiceImpl.java
index 1efd30c88..d84c14d3a 100644
--- 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ResourceServiceImpl.java
+++ 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ResourceServiceImpl.java
@@ -34,8 +34,10 @@ import 
org.apache.shenyu.admin.model.vo.PermissionMenuVO.MenuInfo;
 import org.apache.shenyu.admin.model.vo.ResourceVO;
 import org.apache.shenyu.admin.service.ResourceService;
 import org.apache.shenyu.admin.service.publish.ResourceEventPublisher;
+import org.apache.shenyu.admin.utils.Assert;
 import org.apache.shenyu.admin.utils.ListUtil;
 import org.apache.shenyu.admin.utils.ResourceUtil;
+import org.apache.shenyu.common.constant.AdminConstants;
 import org.apache.shenyu.common.enums.AdminResourceEnum;
 
 import java.util.List;
@@ -209,6 +211,7 @@ public class ResourceServiceImpl implements ResourceService 
{
      */
     @EventListener(value = PluginCreatedEvent.class)
     public void onPluginCreated(final PluginCreatedEvent event) {
+        Assert.isNull(resourceMapper.nameExisted(event.getPlugin().getName()), 
AdminConstants.RESOURCE_NAME_IS_EXIST);
         ResourceDO resourceDO = 
ResourceUtil.buildPluginResource(event.getPlugin().getName());
         this.createOne(resourceDO);
         
insertResourceBatch(ResourceUtil.buildPluginDataPermissionResource(resourceDO.getId(),
 event.getPlugin().getName()));
diff --git a/shenyu-admin/src/main/resources/mappers/resouce-sqlmap.xml 
b/shenyu-admin/src/main/resources/mappers/resouce-sqlmap.xml
index 565e19705..276fabe68 100644
--- a/shenyu-admin/src/main/resources/mappers/resouce-sqlmap.xml
+++ b/shenyu-admin/src/main/resources/mappers/resouce-sqlmap.xml
@@ -139,6 +139,12 @@
         select true from resource where id = #{id} limit 1
     </select>
 
+    <select id="nameExisted" resultType="java.lang.Boolean">
+        SELECT true
+        FROM resource
+        WHERE name = #{name} LIMIT 1
+    </select>
+
     <select id="selectByUserName" 
resultType="org.apache.shenyu.admin.model.entity.ResourceDO">
         select
             <include refid="Base_Column_List"/>
diff --git a/shenyu-admin/src/main/resources/sql-script/h2/schema.sql 
b/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
index 09408666e..ab6885cf5 100755
--- a/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
+++ b/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
@@ -648,6 +648,7 @@ INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, 
`name`, `url`, `compo
 INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, `name`, `url`, 
`component`, `resource_type`, `sort`, `icon`, `is_leaf`, `is_route`, `perms`, 
`status`) 
VALUES('1347046566244003840','1346777449787125760','SHENYU.BUTTON.SYSTEM.SYNCHRONIZE','','','','2','3','','1','0','system:plugin:modify','1');
 INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, `name`, `url`, 
`component`, `resource_type`, `sort`, `icon`, `is_leaf`, `is_route`, `perms`, 
`status`) 
VALUES('1347047143350874112','1346777449787125760','SHENYU.BUTTON.SYSTEM.ENABLE','','','','2','4','','1','0','system:plugin:disable','1');
 INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, `name`, `url`, 
`component`, `resource_type`, `sort`, `icon`, `is_leaf`, `is_route`, `perms`, 
`status`) 
VALUES('1347047203220369408','1346777449787125760','SHENYU.BUTTON.SYSTEM.EDIT','','','','2','5','','1','0','system:plugin:edit','1');
+INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, `name`, `url`, 
`component`, `resource_type`, `sort`, `icon`, `is_leaf`, `is_route`, `perms`, 
`status`) 
VALUES('1572525965625266176','1346777449787125760','SHENYU.BUTTON.SYSTEM.RESOURCE','','','','2','6','','1','0','system:plugin:resource','1');
 
 INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, `name`, `url`, 
`component`, `resource_type`, `sort`, `icon`, `is_leaf`, `is_route`, `perms`, 
`status`) 
VALUES('1346777623011880960','1357956838021890048','SHENYU.PLUGIN.PLUGINHANDLE','pluginhandle','/config/pluginhandle','pluginhandle','1','3','down-square','0','0','','1');
 INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, `name`, `url`, 
`component`, `resource_type`, `sort`, `icon`, `is_leaf`, `is_route`, `perms`, 
`status`) 
VALUES('1347047555588042752','1346777623011880960','SHENYU.BUTTON.SYSTEM.LIST','','','','2','0','','1','0','system:pluginHandler:list','1');
@@ -719,6 +720,7 @@ INSERT IGNORE INTO `permission` (`id`, `object_id`, 
`resource_id`) VALUES ('1351
 INSERT IGNORE INTO `permission` (`id`, `object_id`, `resource_id`) VALUES 
('1351007708715294720', '1346358560427216896', '1347046566244003840');
 INSERT IGNORE INTO `permission` (`id`, `object_id`, `resource_id`) VALUES 
('1351007708719489024', '1346358560427216896', '1347047143350874112');
 INSERT IGNORE INTO `permission` (`id`, `object_id`, `resource_id`) VALUES 
('1351007708723683328', '1346358560427216896', '1347047203220369408');
+INSERT IGNORE INTO `permission` (`id`, `object_id`, `resource_id`) VALUES 
('1572525965658820608', '1346358560427216896', '1572525965625266176');
 INSERT IGNORE INTO `permission` (`id`, `object_id`, `resource_id`) VALUES 
('1351007708606242816', '1346358560427216896', '1346777623011880960');
 INSERT IGNORE INTO `permission` (`id`, `object_id`, `resource_id`) VALUES 
('1351007708727877632', '1346358560427216896', '1347047555588042752');
 INSERT IGNORE INTO `permission` (`id`, `object_id`, `resource_id`) VALUES 
('1351007708732071936', '1346358560427216896', '1347047640145211392');
diff --git a/shenyu-admin/src/main/resources/static/index.6c35abcb.css 
b/shenyu-admin/src/main/resources/static/index.5d736e5c.css
similarity index 81%
rename from shenyu-admin/src/main/resources/static/index.6c35abcb.css
rename to shenyu-admin/src/main/resources/static/index.5d736e5c.css
index d8c8a401b..82fd42443 100644
--- a/shenyu-admin/src/main/resources/static/index.6c35abcb.css
+++ b/shenyu-admin/src/main/resources/static/index.5d736e5c.css
@@ -1,5 +1,5 @@
-#root,body,html{height:100%}.plug-content-wrap{padding:24px}.open{color:#14c974}.close{color:#ff586d}.ant-btn-danger{background:#f5222d!important;color:#fff!important}.ant-layout{min-height:100%}ol,ul{list-style:none}.ant-table{background:#fff}.table-selected{background:#98cdff}.edit{cursor:pointer}.edit,.edit:hover{color:#1890ff}.searchblock{display:-ms-flexbox!important;display:flex!important}.searchblock
 button{margin-left:30px}.ant-table 
table{padding:0!important}.ant-table-small>.an [...]
-  /*! autoprefixer: ignore next 
*/-webkit-box-orient:vertical;overflow:hidden}.condition___2ujo0{margin-top:8px;display:-ms-flexbox;display:flex}.condition___2ujo0
 ul{padding:0 0 10px 
6px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:top;align-items:top}.condition___2ujo0
 ul li{margin-right:4px}.condition___2ujo0 ul li 
.appName___2e-rL{width:65px;text-align:center;padding:0;font-size:12px}.condition___2ujo0
 ul li .appParam___ [...]
+#root,body,html{height:100%}.plug-content-wrap{padding:24px}.open{color:#14c974}.close{color:#ff586d}.ant-btn-danger{background:#f5222d!important;color:#fff!important}.ant-layout{min-height:100%}ol,ul{list-style:none}.ant-table{background:#fff}.table-selected{background:#98cdff}.edit{cursor:pointer}.edit,.edit:hover{color:#1890ff}.searchblock{display:-ms-flexbox!important;display:flex!important}.searchblock
 button{margin-left:30px}.ant-table 
table{padding:0!important}.ant-table-small>.an [...]
+  /*! autoprefixer: ignore next 
*/-webkit-box-orient:vertical;overflow:hidden}.optionParts___1KtSu{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.optionParts___1KtSu
 
div:first-child{margin-right:16px}.condition___2ujo0{margin-top:8px;display:-ms-flexbox;display:flex}.condition___2ujo0
 ul{padding:0 0 10px 
6px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:top;align-items:top}.condition___2ujo0
 ul  [...]
  * 
  * antd v3.26.20
  * 
diff --git a/shenyu-admin/src/main/resources/static/index.a0c1819b.js 
b/shenyu-admin/src/main/resources/static/index.a0c1819b.js
deleted file mode 100644
index c451efc6b..000000000
--- a/shenyu-admin/src/main/resources/static/index.a0c1819b.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){function t(r){if(n[r])return n[r].exports;var 
o=n[r]={i:r,l:!1,exports:{}};return 
e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var 
n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var
 n=e&&e.__esModule?function(){return e.default}:function(){return e};return 
t.d(n,"a",n),n},t.o=function(e,t){return 
Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s="lVK7")}({"+0it":function(e,t,n){"u
 [...]
\ No newline at end of file
diff --git a/shenyu-admin/src/main/resources/static/index.adcea31f.js 
b/shenyu-admin/src/main/resources/static/index.adcea31f.js
new file mode 100644
index 000000000..ea1bbd08e
--- /dev/null
+++ b/shenyu-admin/src/main/resources/static/index.adcea31f.js
@@ -0,0 +1 @@
+!function(e){function t(r){if(n[r])return n[r].exports;var 
o=n[r]={i:r,l:!1,exports:{}};return 
e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var 
n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var
 n=e&&e.__esModule?function(){return e.default}:function(){return e};return 
t.d(n,"a",n),n},t.o=function(e,t){return 
Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s="lVK7")}({"+0it":function(e,t,n){"u
 [...]
\ No newline at end of file
diff --git a/shenyu-admin/src/main/resources/static/index.html 
b/shenyu-admin/src/main/resources/static/index.html
index d5ccf6ee0..d12665747 100644
--- a/shenyu-admin/src/main/resources/static/index.html
+++ b/shenyu-admin/src/main/resources/static/index.html
@@ -4,31 +4,31 @@
   ~ this work for additional information regarding copyright ownership.
   ~ The ASF licenses this file to You under the Apache License, Version 2.0
   ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
+  ~  he License.  You may obtain a copy of the License at
   ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~      http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
   -->
 
 <!DOCTYPE html>
 <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml";>
-  <head>
-    <meta charset="UTF-8" />
-    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-    <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <title>Apache ShenYu Gateway</title>
-    <link rel="icon" href="/favicon.ico" type="image/x-icon" />
-    <link href="/index.6c35abcb.css" rel="stylesheet" />
-  </head>
 
-  <body>
-    <div id="httpPath" style="display: none" th:text="${domain}"></div>
-    <div id="root"></div>
-    <script type="text/javascript" src="/index.a0c1819b.js"></script>
-  </body>
+<head>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <title>Apache ShenYu Gateway</title>
+  <link rel="icon" href="/favicon.png" type="image/x-icon">
+<link href="/index.5d736e5c.css" rel="stylesheet"></head>
+
+<body>
+  <div id="httpPath" style="display: none" th:text="${domain}"></div>
+  <div id="root"></div>
+<script type="text/javascript" src="/index.adcea31f.js"></script></body>
+
 </html>
diff --git 
a/shenyu-common/src/main/java/org/apache/shenyu/common/constant/AdminConstants.java
 
b/shenyu-common/src/main/java/org/apache/shenyu/common/constant/AdminConstants.java
index 41348df10..08c75f2b5 100644
--- 
a/shenyu-common/src/main/java/org/apache/shenyu/common/constant/AdminConstants.java
+++ 
b/shenyu-common/src/main/java/org/apache/shenyu/common/constant/AdminConstants.java
@@ -32,6 +32,11 @@ public final class AdminConstants {
      */
     public static final String PLUGIN_NAME_IS_EXIST = "The plugin name already 
exists and can't be added repeatedly!";
 
+    /**
+     * The constant RESOURCE_NAME_IS_EXIST.
+     */
+    public static final String RESOURCE_NAME_IS_EXIST = "The resource name 
already exists and can't be added repeatedly!";
+
     /**
      * The constant ID_NOT_EXIST.
      */

Reply via email to