소스 검색

forest演示最后上传,修改网关,添加数据文件

bobo 4 년 전
부모
커밋
01f41a3862

+ 2 - 5
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/UploadCompanyInfoAndProductController.java

@@ -34,10 +34,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.mock.web.MockMultipartFile;
 import org.springframework.mock.web.MockMultipartFile;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 
 
 import java.io.File;
 import java.io.File;
@@ -70,7 +67,7 @@ public class UploadCompanyInfoAndProductController {
             @ApiImplicitParam(name = "type",value = "上传类型",required = true,allowableValues = "1,2,3"),
             @ApiImplicitParam(name = "type",value = "上传类型",required = true,allowableValues = "1,2,3"),
             @ApiImplicitParam(name = "compName",value = "公司名称",required = false)
             @ApiImplicitParam(name = "compName",value = "公司名称",required = false)
     })
     })
-    @GetMapping("/upload")
+    @PostMapping("/upload")
     public CommonResult readFile(@RequestParam(value = "paths")String paths, @RequestParam(value = "type")String type, @RequestParam(value = "compName",required = false)String compName){
     public CommonResult readFile(@RequestParam(value = "paths")String paths, @RequestParam(value = "type")String type, @RequestParam(value = "compName",required = false)String compName){
 
 
         if ("1".equals(type)){
         if ("1".equals(type)){

+ 5 - 0
forest-admin/admin-server/src/main/resources/bootstrap.yml

@@ -14,3 +14,8 @@ spring:
         server-addr: 172.16.90.3:8898
         server-addr: 172.16.90.3:8898
         prefix: forest-admin
         prefix: forest-admin
         file-extension: yaml
         file-extension: yaml
+
+        #添加共享配置
+
+        shared-dataids: forest-common.yml
+

+ 2 - 2
nacos/conf/application.properties

@@ -18,7 +18,7 @@
 ### Default web context path:
 ### Default web context path:
 server.servlet.contextPath=/nacos
 server.servlet.contextPath=/nacos
 ### Default web server port:
 ### Default web server port:
-server.port=8838
+server.port=8898
 
 
 #*************** Network Related Configurations ***************#
 #*************** Network Related Configurations ***************#
 ### If prefer hostname over ip for Nacos server addresses in cluster.conf:
 ### If prefer hostname over ip for Nacos server addresses in cluster.conf:
@@ -36,7 +36,7 @@ server.port=8838
  db.num=1
  db.num=1
 
 
 ### Connect URL of DB:
 ### Connect URL of DB:
- db.url.0=jdbc:mysql://172.16.90.64:3306/forest-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
+ db.url.0=jdbc:mysql://172.16.90.253:3306/forest-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
  db.user=root
  db.user=root
  db.password=123456
  db.password=123456
 
 

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

@@ -1,107 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://172.16.90.64:3306/carbon-mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123456
-    druid:
-      initial-size: 5 #连接池初始化大小
-      min-idle: 10 #最小空闲连接数
-      max-active: 20 #最大连接数
-      web-stat-filter:
-        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
-      stat-view-servlet: #访问监控网页的登录用户名和密码
-        login-username: druid
-        login-password: druid
-  redis:
-    host: 172.16.90.64 # Redis服务器地址
-    database: 0 # Redis数据库索引(默认为0)
-    port: 6379 # Redis服务器连接端口
-    password: # Redis服务器连接密码(默认为空)
-    timeout: 300ms # 连接超时时间(毫秒)
-  zipkin:
-    base-url: http://localhost:9411
-    locator:
-      discovery:
-        enabled: true
-  sleuth:
-    sampler:
-      # zipkin 抽样比例 在默认情况下,该值为0.1
-      probability: 1.0
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:8095
-        instance:
-          service-base-url: http://localhost:8099
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-mybatis:
-  mapper-locations:
-    - classpath:dao/*.xml
-    - classpath*:com/**/mapper/*.xml
-logging:
-  level:
-    root: info #日志配置DEBUG,INFO,WARN,ERROR
-    com.hwrj.cloud: debug
-
-  sleuth:
-    sampler:
-      # zipkin 抽样比例 在默认情况下,该值为0.1
-      probability: 1.0
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:9091
-
-# 过滤不需要认证路径条件         
-secure:
-  ignored:
-    urls:
-      - /swagger-ui.html
-      - /swagger-resources/**
-      - /swagger/**
-      - /**/v2/api-docs
-      - /**/*.js
-      - /**/*.css
-      - /**/*.png
-      - /**/*.ico
-      - /webjars/springfox-swagger-ui/**
-      - /actuator/**
-      - /druid/**
-      - /admin/login
-      - /admin/register
-      - /admin/info
-      - /admin/logout
-      - /minio/upload
-      - /product/import
-      - /big/**
-jwt:
-  tokenHeader: Authorization
-  secret: forest-admin-secret
-  expiration: 604800
-  tokenHead: Bearer
-
-redis:
-  database: forest
-  key:
-    admin: 'ums:admin'
-    token: 'ums:token'
-    resourceList: 'ums:resourceList'
-  expire:
-    common: 86400 # 24小时
-qiniu:
-  accessKey: FLWUJxiZY1_N-5d6J_jsdgbqyjVDUg86ghZHsaQW
-  bucket: forestcloud
-  path: http://qny.gzsdtfp.com/
-  processName: 'null'
-  secretKey: So55w4fQ2dTQ6uMlWuUywmKG8ZTqVhWfr_3Ii7GI

+ 0 - 68
nacos/data/config-data/DEFAULT_GROUP/forest-gateway

@@ -1,68 +0,0 @@
-spring:
-  redis:
-    host: 172.16.90.64
-    database: 0
-    port: 6379
-    password:
-    timeout: 300ms
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:9091
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-# 过滤不需要认证路径条件
-secure:
-  ignored:
-    urls: #安全路径白名单
-      - /swagger-ui.html
-      - /*.html
-      - /swagger-resources/**
-      - /swagger/**
-      - /**/v2/api-docs
-      - /**/*.js
-      - /**/*.css
-      - /**/*.png
-      - /**/*.ico
-      - /webjars/springfox-swagger-ui/**
-      - /actuator/**
-      - /druid/**
-      - /home/**
-      - /product/**
-      - /wechat/h5/authorize
-      - /wechat/h5/userInfo
-      - /admin/login
-      - /sso/login
-      - /sso/getLoginCode
-      - /sso/register
-      - /sso/getAuthCode
-      - /admin/register
-      - /admin/info
-      - /admin/logout
-      - /minio/upload
-      - /sso/loginPhone
-      - /product/import
-      - /big/**
-      - /company/**
-jwt:
-  tokenHeader: Authorization
-  secret: forest-admin-secret
-  expiration: 604800
-  tokenHead: Bearer
-redis:
-  database: forest
-  key:
-    admin: 'ums:admin'
-    token: 'ums:token'
-    resourceList: 'ums:resourceList'
-  expire:
-    common: 86400 # 24小时

+ 0 - 121
nacos/data/config-data/DEFAULT_GROUP/forest-portal

@@ -1,121 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://172.16.90.64:3306/carbon-mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123456
-    druid:
-      initial-size: 5 #连接池初始化大小
-      min-idle: 10 #最小空闲连接数
-      max-active: 20 #最大连接数
-      web-stat-filter:
-        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
-      stat-view-servlet: #访问监控网页的登录用户名和密码
-        login-username: druid
-        login-password: druid
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:9091
-
-
-  redis:
-    host: 172.16.90.64 # Redis服务器地址
-    database: 0 # Redis数据库索引(默认为0)
-    port: 6379 # Redis服务器连接端口
-    password: # Redis服务器连接密码(默认为空)
-    timeout: 300ms # 连接超时时间(毫秒)
-
-  rabbitmq:
-    host: 172.16.90.64
-    port: 5672
-    virtual-host: /forest
-    username: forest
-    password: 123456
-    publisher-confirms: true #如果对异步消息需要回调必须设置为true
-
-# 日志配置
-logging:
-  level:
-    org.springframework.data.mongodb.core: debug
-    com.hwrj.cloud.portal.mapper: debug
-    com.hwrj.cloud.portal.dao: debug
-
-mybatis:
-  mapper-locations:
-    - classpath:dao/*.xml
-    - classpath*:com/**/mapper/*.xml
-
-jwt:
-  tokenHeader: Authorization #JWT存储的请求头
-  secret: forest-admin-secret #JWT加解密使用的密钥
-  expiration: 604800 #JWT的超期限时间(60*60*24*7)
-  tokenHead: Bearer  #JWT负载中拿到开头
-
-
-
-secure:
-  ignored:
-    urls: #安全路径白名单
-      - /swagger-ui.html
-      - /*.html
-      - /swagger-resources/**
-      - /swagger/**
-      - /**/v2/api-docs
-      - /**/*.js
-      - /**/*.css
-      - /**/*.png
-      - /**/*.ico
-      - /webjars/springfox-swagger-ui/**
-      - /druid/**
-      - /actuator/**
-      - /sso/**
-      - /wechat/**
-      - /home/**
-      - /product/**
-      - /brand/**
-      - /company/**
-
-
-# 消息队列定义
-rabbitmq:
-  queue:
-    name:
-      cancelOrder: cancelOrderQueue
-# 自定义redis key
-redis:
-  database: forest
-  key:
-    authCode: 'ums:authCode'
-    telLoginCode: 'ums:authCode'
-    orderId: 'oms:orderId'
-    member: 'ums:member'
-    token: 'ums:token'
-  expire:
-    authCode: 90 # 验证码超期时间
-    authLoginCode: 240 # 验证码超期时间
-    common: 86400 # 24小时
-
-forest:
-  wx: 
-    password: forest123456
-
-sms:
-  accessKeyId: wxde051d502a3d27a5
-  accessKeySecret: lCuyL3MUQRLfoVw39W0NqWdVGoLV60
-  signName: 慧云网安
-wx:
-  mp:
-    aesKey: 123
-    # appId: wxbe90cc7c5233dd84
-    appId: wxde051d502a3d27a5
-    # secret: ec4a18ce1a7bcf17cf592c3d57cec68a
-    secret: bdcec99f22bbc1db100d8a7a222c5fa9
-    token: 123
-    url: http://forest.hw.hongweisoft.com/devback/forest-portal/wechat/h5/userInfo
-    before: http://forest.hw.hongweisoft.com
-
-
-
-
-

+ 0 - 52
nacos/data/config-data/DEFAULT_GROUP/mall-admin-cms

@@ -1,52 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://172.16.90.64:3306/carbon-mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123456
-    druid:
-      initial-size: 5 #连接池初始化大小
-      min-idle: 10 #最小空闲连接数
-      max-active: 20 #最大连接数
-      web-stat-filter:
-        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
-      stat-view-servlet: #访问监控网页的登录用户名和密码
-        login-username: druid
-        login-password: druid
-  redis:
-    host: 172.16.90.64 # Redis服务器地址
-    database: 0 # Redis数据库索引(默认为0)
-    port: 6379 # Redis服务器连接端口
-    password: # Redis服务器连接密码(默认为空)
-    timeout: 300ms # 连接超时时间(毫秒)
-  zipkin:
-    base-url: http://localhost:9411
-    locator:
-      discovery:
-        enabled: true
-  sleuth:
-    sampler:
-      # zipkin 抽样比例 在默认情况下,该值为0.1
-      probability: 1.0
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:8095
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-mybatis:
-  mapper-locations:
-    - classpath:dao/*.xml
-    - classpath*:com/**/mapper/*.xml
-logging:
-  level:
-    root: info #日志配置DEBUG,INFO,WARN,ERROR
-    com.mtcarpenter.mall: debug

+ 0 - 52
nacos/data/config-data/DEFAULT_GROUP/mall-admin-oms

@@ -1,52 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://172.16.90.64:3306/carbon-mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123456
-    druid:
-      initial-size: 5 #连接池初始化大小
-      min-idle: 10 #最小空闲连接数
-      max-active: 20 #最大连接数
-      web-stat-filter:
-        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
-      stat-view-servlet: #访问监控网页的登录用户名和密码
-        login-username: druid
-        login-password: druid
-  redis:
-    host: 172.16.90.64 # Redis服务器地址
-    database: 0 # Redis数据库索引(默认为0)
-    port: 6379 # Redis服务器连接端口
-    password: # Redis服务器连接密码(默认为空)
-    timeout: 300ms # 连接超时时间(毫秒)
-  zipkin:
-    base-url: http://localhost:9411
-    locator:
-      discovery:
-        enabled: true
-  sleuth:
-    sampler:
-      # zipkin 抽样比例 在默认情况下,该值为0.1
-      probability: 1.0
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:8095
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-mybatis:
-  mapper-locations:
-    - classpath:dao/*.xml
-    - classpath*:com/**/mapper/*.xml
-logging:
-  level:
-    root: info #日志配置DEBUG,INFO,WARN,ERROR
-    com.mtcarpenter.mall: info

+ 0 - 52
nacos/data/config-data/DEFAULT_GROUP/mall-admin-pms

@@ -1,52 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://172.16.90.64:3306/carbon-mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123456
-    druid:
-      initial-size: 5 #连接池初始化大小
-      min-idle: 10 #最小空闲连接数
-      max-active: 20 #最大连接数
-      web-stat-filter:
-        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
-      stat-view-servlet: #访问监控网页的登录用户名和密码
-        login-username: druid
-        login-password: druid
-  redis:
-    host: 172.16.90.64 # Redis服务器地址
-    database: 0 # Redis数据库索引(默认为0)
-    port: 6379 # Redis服务器连接端口
-    password: # Redis服务器连接密码(默认为空)
-    timeout: 300ms # 连接超时时间(毫秒)
-  zipkin:
-    base-url: http://localhost:9411
-    locator:
-      discovery:
-        enabled: true
-  sleuth:
-    sampler:
-      # zipkin 抽样比例 在默认情况下,该值为0.1
-      probability: 1.0
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:8095
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-mybatis:
-  mapper-locations:
-    - classpath:dao/*.xml
-    - classpath*:com/**/mapper/*.xml
-logging:
-  level:
-    root: info #日志配置DEBUG,INFO,WARN,ERROR
-    com.mtcarpenter.mall: info

+ 0 - 52
nacos/data/config-data/DEFAULT_GROUP/mall-admin-sms

@@ -1,52 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://172.16.90.64:3306/carbon-mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123456
-    druid:
-      initial-size: 5 #连接池初始化大小
-      min-idle: 10 #最小空闲连接数
-      max-active: 20 #最大连接数
-      web-stat-filter:
-        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
-      stat-view-servlet: #访问监控网页的登录用户名和密码
-        login-username: druid
-        login-password: druid
-  redis:
-    host: 172.16.90.64 # Redis服务器地址
-    database: 0 # Redis数据库索引(默认为0)
-    port: 6379 # Redis服务器连接端口
-    password: # Redis服务器连接密码(默认为空)
-    timeout: 300ms # 连接超时时间(毫秒)
-  zipkin:
-    base-url: http://localhost:9411
-    locator:
-      discovery:
-        enabled: true
-  sleuth:
-    sampler:
-      # zipkin 抽样比例 在默认情况下,该值为0.1
-      probability: 1.0
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:8095
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-mybatis:
-  mapper-locations:
-    - classpath:dao/*.xml
-    - classpath*:com/**/mapper/*.xml
-logging:
-  level:
-    root: info #日志配置DEBUG,INFO,WARN,ERROR
-    com.mtcarpenter.mall: info

+ 0 - 87
nacos/data/config-data/DEFAULT_GROUP/mall-admin-ums

@@ -1,87 +0,0 @@
-spring:
-  datasource:
-    url: jdbc:mysql://172.16.90.64:3306/carbon-mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123456
-    druid:
-      initial-size: 5
-      min-idle: 10
-      max-active: 20
-      web-stat-filter:
-        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" 
-      stat-view-servlet: 
-        login-username: druid
-        login-password: druid
-  redis:
-    host: 172.16.90.64
-    database: 0
-    port: 6379
-    password:
-    timeout: 300ms
-  zipkin:
-    base-url: http://localhost:9411
-    locator:
-      discovery:
-        enabled: true
-  sleuth:
-    sampler:
-      # zipkin 抽样比例 在默认情况下,该值为0.1
-      probability: 1.0
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:8095
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-# 过滤不需要认证路径条件         
-secure:
-  ignored:
-    urls:
-      - /swagger-ui.html
-      - /swagger-resources/**
-      - /swagger/**
-      - /**/v2/api-docs
-      - /**/*.js
-      - /**/*.css
-      - /**/*.png
-      - /**/*.ico
-      - /webjars/springfox-swagger-ui/**
-      - /actuator/**
-      - /druid/**
-      - /admin/login
-      - /admin/register
-      - /admin/info
-      - /admin/logout
-      - /minio/upload
-
-mybatis:
-  mapper-locations:
-    - classpath:dao/*.xml
-    - classpath*:com/**/mapper/*.xml
-jwt:
-  tokenHeader: Authorization
-  secret: mall-admin-secret
-  expiration: 604800
-  tokenHead: Bearer
-
-redis:
-  database: mall
-  key:
-    admin: 'ums:admin'
-    token: 'ums:token'
-    resourceList: 'ums:resourceList'
-  expire:
-    common: 86400 # 24小时
-logging:
-  level:
-    root: info
-    com.mtcarpenter.mall: info

+ 0 - 63
nacos/data/config-data/DEFAULT_GROUP/mall-gateway

@@ -1,63 +0,0 @@
-spring:
-  redis:
-    host: 129.28.174.150
-    database: 0
-    port: 7047
-    password:
-    timeout: 300ms
-  boot:
-    admin:
-      client:
-        # admin 服务端的地址
-        url: http://localhost:8095
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-  endpoint:
-    health:
-      # 展示详情
-      show-details: always
-# 过滤不需要认证路径条件
-secure:
-  ignored:
-    urls: #安全路径白名单
-      - /swagger-ui.html
-      - /swagger-resources/**
-      - /swagger/**
-      - /**/v2/api-docs
-      - /**/*.js
-      - /**/*.css
-      - /**/*.png
-      - /**/*.ico
-      - /webjars/springfox-swagger-ui/**
-      - /actuator/**
-      - /druid/**
-      - /home/**
-      - /product/**
-      - /wechat/h5/**
-      - /admin/login
-      - /sso/login
-      - /sso/getLoginCode
-      - /sso/register
-      - /sso/getAuthCode
-      - /admin/register
-      - /admin/info
-      - /admin/logout
-      - /minio/upload
-      - /sso/loginPhone
-jwt:
-  tokenHeader: Authorization
-  secret: mall-admin-secret
-  expiration: 604800
-  tokenHead: Bearer
-redis:
-  database: mall
-  key:
-    admin: 'ums:admin'
-    token: 'ums:token'
-    resourceList: 'ums:resourceList'
-  expire:
-    common: 86400 # 24小时

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

@@ -1,2 +1,2 @@
-#Fri Sep 11 19:19:08 CST 2020
-term=20
+#Wed Sep 23 16:00:27 CST 2020
+term=4855