Просмотр исходного кода

提交获取权限的供应商

bobo 4 лет назад
Родитель
Сommit
15a3fa4516
20 измененных файлов с 450 добавлено и 6 удалено
  1. 1 0
      forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsCompanyInfoMapper.java
  2. 1 1
      forest-admin/admin-mbg/src/main/resources/generatorConfig.xml
  3. 6 1
      forest-admin/admin-server/pom.xml
  4. 12 2
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/AdminApplication.java
  5. 33 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/annotation/DataPermission.java
  6. 5 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/config/Swagger2Config.java
  7. 28 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/config/exclud/MybatisAutoConfiguration.java
  8. 36 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/OmsPreItemController.java
  9. 8 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsCompanyController.java
  10. 18 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/OmsPreItemDao.java
  11. 142 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/inteceptor/DataPermissionInterceptor.java
  12. 20 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/OmsPreItemService.java
  13. 33 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/OmsPreItemServiceImpl.java
  14. 37 0
      forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/util/PluginUtils.java
  15. 1 0
      forest-admin/admin-server/src/main/resources/META-INF/spring.factories
  16. 8 0
      forest-admin/admin-server/src/main/resources/banner.txt
  17. 38 0
      forest-admin/admin-server/src/main/resources/dao/OmsPreItemDao.xml
  18. 1 0
      nacos/data/config-data/DEFAULT_GROUP/forest-admin
  19. 2 2
      nacos/data/naming/meta.properties
  20. 20 0
      pom.xml

+ 1 - 0
forest-admin/admin-mbg/src/main/java/com/hwrj/cloud/admin/mapper/UmsCompanyInfoMapper.java

@@ -5,6 +5,7 @@ import com.hwrj.cloud.admin.model.UmsCompanyInfoExample;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
+
 public interface UmsCompanyInfoMapper {
     long countByExample(UmsCompanyInfoExample example);
 

+ 1 - 1
forest-admin/admin-mbg/src/main/resources/generatorConfig.xml

@@ -37,7 +37,7 @@
         <javaClientGenerator type="XMLMAPPER" targetPackage="com.hwrj.cloud.admin.mapper"
                              targetProject="forest-admin\admin-mbg\src\main\java"/>
         <!--生成全部表tableName设为%-->
-        <table tableName="ums_admin">
+        <table tableName="oms_pre_item">
             <generatedKey column="id" sqlStatement="MySql" identity="true"/>
         </table>
     </context>

+ 6 - 1
forest-admin/admin-server/pom.xml

@@ -100,9 +100,14 @@
         <dependency>
             <groupId>com.qiniu</groupId>
             <artifactId>qiniu-java-sdk</artifactId>
-            <version>[7.2.0, 7.2.99]</version>
+            <version>7.2.28</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-micro-spring-boot-starter</artifactId>
+            <version>2.0.4</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 12 - 2
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/AdminApplication.java

@@ -1,15 +1,25 @@
 package com.hwrj.cloud.admin;
 
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.core.env.ConfigurableEnvironment;
 import org.springframework.scheduling.annotation.EnableAsync;
 
+
+
+@Slf4j
 @EnableAsync
 @SpringBootApplication
-@ComponentScan(basePackages = {"com.hwrj.cloud"})
+@ComponentScan(basePackages = {"com.hwrj.cloud"},  excludeFilters = @ComponentScan.Filter(
+        type = FilterType.REGEX,
+        pattern = "com.hwrj.cloud.admin.config.exclud.*"))
 public class AdminApplication {
     public static void main(String[] args) {
-        SpringApplication.run(AdminApplication.class, args);
+        ConfigurableApplicationContext application=SpringApplication.run(AdminApplication.class, args);
+        ConfigurableEnvironment environment = application.getEnvironment();
     }
 }

+ 33 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/annotation/DataPermission.java

@@ -0,0 +1,33 @@
+package com.hwrj.cloud.admin.annotation;
+
+import java.lang.annotation.*;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface DataPermission {
+
+    /**
+     * mapper层需要数据权限过滤的方法名集合
+     *
+     * @return 方法名数组
+     */
+    String[] methods() default {};
+
+    /**
+     * mapper层需要数据过滤的方法名前缀,
+     * 比如指定为find,表示所有以find开头的方法
+     * 都会进行数据权限过滤
+     *
+     * @return 方法名前缀
+     */
+    String methodPrefix() default "";
+
+    /**
+     * 数据权限关联字段
+     * 目前系统数据权限通过dept_id关联
+     *
+     * @return String
+     */
+    String field() default "comp_id";
+}

+ 5 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/config/Swagger2Config.java

@@ -1,7 +1,10 @@
 package com.hwrj.cloud.admin.config;
 
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
 import springfox.documentation.builders.ApiInfoBuilder;
 import springfox.documentation.builders.PathSelectors;
 import springfox.documentation.builders.RequestHandlerSelectors;
@@ -20,6 +23,8 @@ import java.util.List;
  */
 @Configuration
 @EnableSwagger2
+@EnableKnife4j
+@Import(BeanValidatorPluginsConfiguration.class)
 public class Swagger2Config {
     @Bean
     public Docket createRestApi(){

+ 28 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/config/exclud/MybatisAutoConfiguration.java

@@ -0,0 +1,28 @@
+package com.hwrj.cloud.admin.config.exclud;
+
+import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration;
+import com.hwrj.cloud.admin.inteceptor.DataPermissionInterceptor;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.context.annotation.Configuration;
+
+import javax.annotation.PostConstruct;
+import java.util.List;
+
+@Configuration
+@AutoConfigureAfter(PageHelperAutoConfiguration.class)
+public class MybatisAutoConfiguration {
+
+
+    @Autowired
+    private List<SqlSessionFactory> sqlSessionFactoryList;
+
+    @PostConstruct
+    public void addMyInterceptor() {
+        DataPermissionInterceptor e = new DataPermissionInterceptor();
+        for (SqlSessionFactory sqlSessionFactory : sqlSessionFactoryList) {
+            sqlSessionFactory.getConfiguration().addInterceptor(e);
+        }
+    }
+}

+ 36 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/OmsPreItemController.java

@@ -0,0 +1,36 @@
+package com.hwrj.cloud.admin.controller;
+
+import com.hwrj.cloud.admin.model.OmsPreItem;
+import com.hwrj.cloud.admin.service.OmsPreItemService;
+import com.hwrj.cloud.common.api.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@Slf4j
+@Api(tags = "意向商品接口")
+@RequestMapping("/oms/pre")
+public class OmsPreItemController {
+    @Autowired
+    private OmsPreItemService omsPreItemService;
+
+    @GetMapping("get")
+    @ApiOperation(value = "获取意向商品接口")
+    public CommonResult getOmsPreItem(){
+        List<OmsPreItem> omsPreItems = omsPreItemService.selectOmsPreItem();
+        return CommonResult.success(omsPreItems);
+    }
+
+    @ApiOperation(value = "删除商品意向")
+    @DeleteMapping
+    public CommonResult delete(@RequestParam(value = "id",required = true)Long id){
+
+        omsPreItemService.delete(id);
+        return CommonResult.success();
+    }
+}

+ 8 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UmsCompanyController.java

@@ -88,6 +88,9 @@ public class UmsCompanyController {
         return CommonResult.success(dto);
     }
 
+
+
+
     /**
      * 导入excel
      * @param request
@@ -133,4 +136,9 @@ public class UmsCompanyController {
         return userId;
     }
 
+    public CommonResult deleteFile(@RequestParam(value = "id")Long id){
+
+        return CommonResult.success();
+    }
+
 }

+ 18 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dao/OmsPreItemDao.java

@@ -0,0 +1,18 @@
+package com.hwrj.cloud.admin.dao;
+
+import com.hwrj.cloud.admin.annotation.DataPermission;
+import com.hwrj.cloud.admin.model.OmsPreItem;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+@DataPermission(methods = {"searchOmsPreItemDao","deletePreItemDao"})
+public interface OmsPreItemDao {
+
+    public List<OmsPreItem> searchOmsPreItemDao();
+
+    public int deletePreItemDao(@Param("id")Long id);
+
+
+}

+ 142 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/inteceptor/DataPermissionInterceptor.java

@@ -0,0 +1,142 @@
+package com.hwrj.cloud.admin.inteceptor;
+
+import com.hwrj.cloud.admin.annotation.DataPermission;
+import com.hwrj.cloud.admin.model.UmsAdmin;
+import com.hwrj.cloud.admin.util.CurrUserUtil;
+import com.hwrj.cloud.admin.util.PluginUtils;
+import lombok.extern.slf4j.Slf4j;
+import net.sf.jsqlparser.expression.operators.conditional.AndExpression;
+import net.sf.jsqlparser.parser.CCJSqlParserManager;
+import net.sf.jsqlparser.parser.CCJSqlParserUtil;
+import net.sf.jsqlparser.schema.Table;
+import net.sf.jsqlparser.statement.select.PlainSelect;
+import net.sf.jsqlparser.statement.select.Select;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.cache.CacheKey;
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.executor.statement.StatementHandler;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.mapping.SqlCommandType;
+import org.apache.ibatis.plugin.*;
+import org.apache.ibatis.reflection.MetaObject;
+import org.apache.ibatis.reflection.SystemMetaObject;
+
+import java.io.StringReader;
+import java.sql.Connection;
+import java.sql.Statement;
+import java.util.Properties;
+
+@Slf4j
+//@Intercepts({
+////        @Signature(type = Executor.class, method = "select", args = {MappedStatement.class, Object.class}),
+//        @Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class}),
+//        @Signature(type = Executor.class, method = "query", args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class, CacheKey.class, BoundSql.class}),
+//        @Signature(type = StatementHandler.class, method = "batch", args = {Statement.class})})
+//@Intercepts({@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class})})
+@Intercepts({@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class})})
+public class DataPermissionInterceptor  implements Interceptor {
+
+
+    @Override
+    public Object intercept(Invocation invocation) throws Throwable {
+        StatementHandler statementHandler = PluginUtils.realTarget(invocation.getTarget());
+        MetaObject metaObject = SystemMetaObject.forObject(statementHandler);
+        MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement");
+
+        BoundSql boundSql = (BoundSql) metaObject.getValue("delegate.boundSql");
+        Object paramObj = boundSql.getParameterObject();
+        // 数据权限只针对查询语句
+        if (SqlCommandType.SELECT == mappedStatement.getSqlCommandType()) {
+            DataPermission dataPermission = getDataPermission(mappedStatement);
+            if (shouldFilter(mappedStatement, dataPermission)) {
+                String id = mappedStatement.getId();
+                log.info("\n 数据权限过滤 method -> {}", id);
+                String originSql = boundSql.getSql();
+                String dataPermissionSql = dataPermissionSql(originSql, dataPermission);
+                metaObject.setValue("delegate.boundSql.sql", dataPermissionSql);
+                log.info("\n originSql -> {} \n dataPermissionSql: {}", originSql, dataPermissionSql);
+            }
+        }else if (SqlCommandType.DELETE == mappedStatement.getSqlCommandType()){
+
+        }else if (SqlCommandType.UPDATE == mappedStatement.getSqlCommandType()){
+
+        }
+        return invocation.proceed();
+    }
+
+    @Override
+    public Object plugin(Object o) {
+        if (o instanceof StatementHandler) {
+            return Plugin.wrap(o, this);
+        }
+        return o;
+    }
+
+    @Override
+    public void setProperties(Properties properties) {
+
+    }
+
+    private String dataPermissionSql(String originSql, DataPermission dataPermission) {
+        try {
+            if (StringUtils.isBlank(dataPermission.field())) {
+                return originSql;
+            }
+            UmsAdmin user = CurrUserUtil.getUmsAdmin();
+            if (user == null) {
+                return originSql;
+            }
+            user.setCompId(14l);
+            CCJSqlParserManager parserManager = new CCJSqlParserManager();
+            Select select = (Select) parserManager.parse(new StringReader(originSql));
+            PlainSelect plainSelect = (PlainSelect) select.getSelectBody();
+            Table fromItem = (Table) plainSelect.getFromItem();
+
+            String selectTableName = fromItem.getAlias() == null ? fromItem.getName() : fromItem.getAlias().getName();
+            String dataPermissionSql = String.format("%s.%s in (%s)", selectTableName, dataPermission.field(), StringUtils.defaultIfBlank(user.getCompId().toString(), "'WITHOUT PERMISSIONS'"));
+
+            if (plainSelect.getWhere() == null) {
+                plainSelect.setWhere(CCJSqlParserUtil.parseCondExpression(dataPermissionSql));
+            } else {
+                plainSelect.setWhere(new AndExpression(plainSelect.getWhere(), CCJSqlParserUtil.parseCondExpression(dataPermissionSql)));
+            }
+            return select.toString();
+        } catch (Exception e) {
+            log.warn("get data permission sql fail: {}", e.getMessage());
+            return originSql;
+        }
+    }
+
+    private DataPermission getDataPermission(MappedStatement mappedStatement) {
+        String mappedStatementId = mappedStatement.getId();
+        DataPermission dataPermission = null;
+        try {
+            String className = mappedStatementId.substring(0, mappedStatementId.lastIndexOf("."));
+            final Class<?> clazz = Class.forName(className);
+            if (clazz.isAnnotationPresent(DataPermission.class)) {
+                dataPermission = clazz.getAnnotation(DataPermission.class);
+            }
+        } catch (Exception ignore) {
+        }
+        return dataPermission;
+    }
+
+    private Boolean shouldFilter(MappedStatement mappedStatement, DataPermission dataPermission) {
+        if (dataPermission != null) {
+            String methodName = StringUtils.substringAfterLast(mappedStatement.getId(), ".");
+            String methodPrefix = dataPermission.methodPrefix();
+            if (StringUtils.isNotBlank(methodPrefix) && StringUtils.startsWith(methodName, methodPrefix)) {
+                return Boolean.TRUE;
+            }
+            String[] methods = dataPermission.methods();
+            for (String method : methods) {
+                if (StringUtils.equals(method, methodName)) {
+                    return Boolean.TRUE;
+                }
+            }
+        }
+        return Boolean.FALSE;
+    }
+
+}

+ 20 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/OmsPreItemService.java

@@ -0,0 +1,20 @@
+package com.hwrj.cloud.admin.service;
+
+import com.hwrj.cloud.admin.annotation.DataPermission;
+import com.hwrj.cloud.admin.model.OmsPreItem;
+
+import java.util.List;
+
+public interface OmsPreItemService {
+
+    /**
+     * 获取意向信息
+     * @return
+     */
+    public List<OmsPreItem> selectOmsPreItem();
+
+    /**
+     * 删除意向信息
+     */
+    public void delete(Long id);
+}

+ 33 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/OmsPreItemServiceImpl.java

@@ -0,0 +1,33 @@
+package com.hwrj.cloud.admin.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.hwrj.cloud.admin.dao.OmsPreItemDao;
+import com.hwrj.cloud.admin.model.OmsPreItem;
+import com.hwrj.cloud.admin.service.OmsPreItemService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Slf4j
+@Service
+public class OmsPreItemServiceImpl implements OmsPreItemService {
+    @Autowired
+    private OmsPreItemDao omsPreItemDao;
+    @Override
+    public List<OmsPreItem> selectOmsPreItem() {
+        log.info("wo men 莱");
+        PageHelper.startPage(1,14);
+        List<OmsPreItem> omsPreItems = omsPreItemDao.searchOmsPreItemDao();
+        return omsPreItems;
+    }
+
+    @Override
+    public void delete(Long id) {
+        if (id == null){
+            throw  new RuntimeException("删除失败");
+        }
+        omsPreItemDao.deletePreItemDao(id);
+    }
+}

+ 37 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/util/PluginUtils.java

@@ -0,0 +1,37 @@
+package com.hwrj.cloud.admin.util;
+
+import com.alibaba.druid.util.StringUtils;
+import org.apache.ibatis.reflection.MetaObject;
+import org.apache.ibatis.reflection.SystemMetaObject;
+
+import java.lang.reflect.Proxy;
+import java.util.Properties;
+
+public class PluginUtils {
+
+    public static final String DELEGATE_BOUNDSQL_SQL = "delegate.boundSql.sql";
+
+    private PluginUtils() {
+        // to do nothing
+    }
+
+    /**
+     * 获得真正的处理对象,可能多层代理.
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T realTarget(Object target) {
+        if (Proxy.isProxyClass(target.getClass())) {
+            MetaObject metaObject = SystemMetaObject.forObject(target);
+            return realTarget(metaObject.getValue("h.target"));
+        }
+        return (T) target;
+    }
+
+    /**
+     * 根据 key 获取 Properties 的值
+     */
+    public static String getProperty(Properties properties, String key) {
+        String value = properties.getProperty(key);
+        return StringUtils.isEmpty(value) ? null : value;
+    }
+}

+ 1 - 0
forest-admin/admin-server/src/main/resources/META-INF/spring.factories

@@ -0,0 +1 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.hwrj.cloud.admin.config.exclud.MybatisAutoConfiguration

+ 8 - 0
forest-admin/admin-server/src/main/resources/banner.txt

@@ -0,0 +1,8 @@
+
+ ,-----.    ,--.          ,-----.
+'  .-.  '   `--' ,--.,--. |  |) /_   ,---.
+|  | |  |   ,--. |  ||  | |  .-.  \ | .-. |
+'  '-'  '-. |  | '  ''  ' |  '--' / ' '-' '
+ `-----'--' `--'  `----'  `------'   `---'
+   ${spring.application.name}                 |
+   Spring-Boot: ${spring-boot.version} |

+ 38 - 0
forest-admin/admin-server/src/main/resources/dao/OmsPreItemDao.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hwrj.cloud.admin.dao.OmsPreItemDao">
+    <resultMap id="BaseResultMap" type="com.hwrj.cloud.admin.model.OmsPreItem">
+        <id column="id" jdbcType="BIGINT" property="id" />
+        <result column="product_id" jdbcType="BIGINT" property="productId" />
+        <result column="member_id" jdbcType="BIGINT" property="memberId" />
+        <result column="comp_id" jdbcType="BIGINT" property="compId" />
+        <result column="push_id" jdbcType="BIGINT" property="pushId" />
+        <result column="origin_id" jdbcType="BIGINT" property="originId" />
+        <result column="origin_name" jdbcType="VARCHAR" property="originName" />
+        <result column="comp_name" jdbcType="VARCHAR" property="compName" />
+        <result column="price" jdbcType="DECIMAL" property="price" />
+        <result column="product_pic" jdbcType="VARCHAR" property="productPic" />
+        <result column="product_name" jdbcType="VARCHAR" property="productName" />
+        <result column="product_sub_title" jdbcType="VARCHAR" property="productSubTitle" />
+        <result column="product_sku_code" jdbcType="VARCHAR" property="productSkuCode" />
+        <result column="member_nickname" jdbcType="VARCHAR" property="memberNickname" />
+        <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
+        <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
+        <result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
+        <result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
+        <result column="product_brand" jdbcType="VARCHAR" property="productBrand" />
+        <result column="product_sn" jdbcType="VARCHAR" property="productSn" />
+        <result column="product_attr" jdbcType="VARCHAR" property="productAttr" />
+    </resultMap>
+    <select id="searchOmsPreItemDao" resultMap="BaseResultMap">
+        select * from oms_pre_item
+
+
+
+
+    </select>
+    <delete id="deletePreItemDao" parameterType="java.lang.Long"  >
+        delete from ums_pre_item where id = #{id}
+    </delete>
+
+</mapper>

+ 1 - 0
nacos/data/config-data/DEFAULT_GROUP/forest-admin

@@ -79,6 +79,7 @@ secure:
   ignored:
     urls:
       - /swagger-ui.html
+      - /doc.html
       - /swagger-resources/**
       - /swagger/**
       - /**/v2/api-docs

+ 2 - 2
nacos/data/naming/meta.properties

@@ -1,2 +1,2 @@
-#Thu Sep 24 17:30:42 CST 2020
-term=647
+#Sun Sep 27 02:16:42 CST 2020
+term=12142

+ 20 - 0
pom.xml

@@ -43,6 +43,7 @@
         <minio.version>3.0.10</minio.version>
         <forest.version>0.0.1-SNAPSHOT</forest.version>
         <guava.version>25.1-jre</guava.version>
+        <knife4j.version>2.0.4</knife4j.version>
         <spring.boot.admin.version>2.1.6</spring.boot.admin.version>
     </properties>
 
@@ -60,6 +61,22 @@
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-spring-boot-starter</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+
+
+
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-micro-spring-boot-starter</artifactId>
+            <version>${knife4j.version}</version>
+        </dependency>
+
+
+
     </dependencies>
 
 
@@ -192,6 +209,9 @@
                 <artifactId>guava</artifactId>
                 <version>${guava.version}</version>
             </dependency>
+
+
+
         </dependencies>
     </dependencyManagement>