Browse Source

私有化部署:配置文件迁移,从Nacos到vpp

tangxiangan 1 year ago
parent
commit
54e2acb965

+ 47 - 0
pdf-tech-core/src/main/resources/application-pro.yml

@@ -0,0 +1,47 @@
+server:
+  port: 8032
+security:
+  oauth2:
+    client:
+      client-id: pdf-tech-core
+      client-secret: kdan@2022
+      user-authorization-uri: http://localhost:8032/pdf-tech/oauth/authorize
+      access-token-uri: http://localhost:8032/pdf-tech/oauth/token
+      resource:
+        user-info-uri: http://localhost:8032/pdf-tech/user/me
+
+jdbc:
+  driverClassName: org.postgresql.Driver
+  url: jdbc:postgresql://34.145.212.19:5432/pdf-store-prod
+  username: postgres
+  password: uiddd123..89
+
+
+redis:
+  max-redirects: 3
+  maxIdle: 100
+  connectionTimeout: 100000
+  socketTimeout: 100000
+  maxAttempts: 5
+  maxTotal: 200
+  minIdle: 10
+  nodes: 35.188.251.105:6371,35.188.251.105:6372,35.188.251.105:6373,35.188.251.105:6374,35.188.251.105:6375,35.188.251.105:6376
+  password: 1qazZAQ2
+
+#ssoUrl: https://pdfreader-dev.oss-cn-shanghai.aliyuncs.com/saas/test-xiangan
+
+#webUrl: https://adminconsole.pdfreaderpro.com
+#createUrl: /sign-up
+#loginUrl: /login
+
+#readerproUrl: https://www.pdfreaderpro.com
+#confirmAddUrl: /join-team
+#emailImagesUrl: https://store.pdfreaderpro.com
+
+mail:
+  username: no-reply@pdfreaderpro.com
+  password: 20231114$cc.$!xx
+  host: smtp.zoho.com
+  port: 465
+  protocol: smtp
+  default-encoding: UTF-8

+ 84 - 0
pdf-tech-core/src/main/resources/application.yml

@@ -0,0 +1,84 @@
+server:
+  servlet:
+    context-path: /pdf-tech
+spring:
+  application:
+    name: pdf-tech
+  profiles:
+    active: @spring.profiles.active@
+  datasource:
+    name: mydb
+    url: ${jdbc.url}
+    username: ${jdbc.username}
+    password: ${jdbc.password}
+    # 使用druid数据源
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: ${jdbc.driverClassName}
+    filters: stat
+    maxActive: 20
+    initialSize: 1
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: true
+    maxOpenPreparedStatements: 20
+  servlet:
+    multipart:
+      max-file-size: 20MB
+      max-request-size: 20MB
+  #redis连接池
+  redis:
+    cluster:
+      nodes: ${redis.nodes}
+      max-redirects: ${redis.max-redirects}
+    password: ${redis.password}
+    lettuce:
+      pool:
+        max-active: ${redis.maxTotal}
+        max-wait: ${redis.socketTimeout}
+        max-idle: ${redis.maxIdle}
+        min-idle: ${redis.minIdle}
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+
+#不共享一级缓存
+mybatis:
+  configuration:
+    local-cache-scope: statement
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  #构建数据对象映射文件
+  mapper-locations: classpath:sqlmap/**/*.xml
+  type-aliases-package: cn.kdan.pdf.tech.core.model
+
+≈:
+  helperDialect: postgresql
+  reasonable: true
+  supportMethodsArguments: true
+
+swagger:
+  base-package: cn.kdan.pdf.tech.core.controller
+  description: pdf-tech api test
+  title: pdf-tech api test
+
+logging:
+  level:
+    cn.kdan.pdf.tech.core.mapper: info
+
+cors:
+  allow-headers: "X-Requested-With,Content-Type,Cookie,Accept,authorization,Authorization,credential,keyword,x-auth-token,iv,jsonFlag,timeStamp,random"
+  allow-methods: "*"
+  allow-expose: "x-auth-token,Content-Disposition"
+  allow-credentials: "true"
+  allow-origins: "*"
+  allow-max-age: "3600"
+httpMatchers:
+  request: "/login,/logout,/vppMember/resetPassword,/oauth/**,/auth/**,/vppMember/create,/vppTeam/confirmTeamMember,/static/images/**"
+  web: "/hystrix.stream,/webjars/**,/resources/**,/swagger-ui.html,/swagger-resources/**,/v2/api-docs,/static/images/**"
+

+ 0 - 12
pdf-tech-core/src/main/resources/bootstrap.properties

@@ -1,12 +0,0 @@
-server.servlet.context-path= /pdf-tech
-spring.application.name= pdf-tech
-spring.profiles.active=@spring.profiles.active@
-# dev
-#spring.cloud.nacos.config.server-addr=http://106.55.99.175:8848
-# pro
-spring.cloud.nacos.config.server-addr=http://35.188.251.105:28858
-spring.cloud.nacos.config.username=nacos
-spring.cloud.nacos.config.password=Nacos@123!
-spring.cloud.nacos.config.file-extension=yml
-spring.cloud.nacos.config.refresh-enabled=true
-