From 3d57559aff9a0bf3e804b22b4fbcf51b9f375b1b Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Sat, 1 Mar 2025 11:35:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth_bootstrap.yml | 8 +- scripts_244_bonus_houqin_test/deploy.sh | 23 +- .../file_bootstrap.yml | 8 +- .../gateway_bootstrap.yml | 10 +- .../gen_bootstrap.yml | 8 +- .../information-server.yml | 344 ------------------ .../job_bootstrap.yml | 8 +- scripts_244_bonus_houqin_test/kill-ps.sh | 14 +- scripts_244_bonus_houqin_test/log-server.yml | 217 ----------- .../shared_station_bootstrap.yml | 8 +- .../smart_canteen_bootstrap.yml | 8 +- .../system-server.yml | 39 -- .../system_bootstrap.yml | 8 +- .../visual_bootstrap.yml | 8 +- scripts_244_smart_canteen_test/deploy.sh | 2 +- 15 files changed, 56 insertions(+), 657 deletions(-) delete mode 100644 scripts_244_bonus_houqin_test/information-server.yml delete mode 100644 scripts_244_bonus_houqin_test/log-server.yml delete mode 100644 scripts_244_bonus_houqin_test/system-server.yml diff --git a/scripts_244_bonus_houqin_test/auth_bootstrap.yml b/scripts_244_bonus_houqin_test/auth_bootstrap.yml index bf5b0e6a..b7ef4cfa 100644 --- a/scripts_244_bonus_houqin_test/auth_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/auth_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38381 + port: 58581 # Spring spring: @@ -9,7 +9,7 @@ spring: name: bonus-auth profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_bonus_houqin_test/deploy.sh b/scripts_244_bonus_houqin_test/deploy.sh index 85bd032c..9f41ef99 100644 --- a/scripts_244_bonus_houqin_test/deploy.sh +++ b/scripts_244_bonus_houqin_test/deploy.sh @@ -1,10 +1,10 @@ #!/bin/bash -suffix="-smart-canteen" +suffix="-bonus-houqin" jar_version="24.10.0-SNAPSHOT" export deploy_path=/opt/webapps/bonus-houqin -export app_workspace=/opt/builds/releases/Bonus-Cloud/${jar_version} -export biz_workspace=/opt/install/jenkins_home/workspace/Bonus-Cloud-Smart-Canteen +export app_workspace=/opt/builds/releases/Bonus-Cloud-Houqin-Temp/${jar_version} +export biz_workspace=/opt/install/jenkins_home/workspace/Bonus-Cloud-Houqin app_source_jars=( "bonus-auth-${jar_version}.jar" @@ -34,18 +34,17 @@ for source_jar in "${app_source_jars[@]}"; do echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'" done -cp -f ${biz_workspace}/"bonus-modules/bonus-smart-canteen/target/bonus-smart-canteen.jar" $deploy_path +cp -f ${biz_workspace}/"bonus-modules/bonus-houqin/target/bonus-smart-canteen.jar" $deploy_path echo "copied ${app_workspace}/${source_jar} to $deploy_path" # Define an array of JAR files to run -jars=("bonus-auth-${jar_version}-smart-canteen.jar --spring.config.location=file:auth_bootstrap.yml" -"bonus-gateway-${jar_version}-smart-canteen.jar --spring.config.location=file:gateway_bootstrap.yml" -"bonus-system-${jar_version}-smart-canteen.jar --spring.config.location=file:system_bootstrap.yml" -"bonus-job-${jar_version}-smart-canteen.jar --spring.config.location=file:job_bootstrap.yml" -"bonus-file-${jar_version}-smart-canteen.jar --spring.config.location=file:file_bootstrap.yml" -"bonus-visual-monitor-${jar_version}-smart-canteen.jar --spring.config.location=file:visual_bootstrap.yml" -"bonus-smart-canteen.jar --spring.config.location=file:smart_canteen_bootstrap.yml" -"bonus-cust-auth.jar --spring.config.location=file:cust_auth_bootstrap.yml") +jars=("bonus-auth-${jar_version}-bonus-houqin.jar --spring.config.location=file:auth_bootstrap.yml" +"bonus-gateway-${jar_version}-bonus-houqin.jar --spring.config.location=file:gateway_bootstrap.yml" +"bonus-system-${jar_version}-bonus-houqin.jar --spring.config.location=file:system_bootstrap.yml" +"bonus-job-${jar_version}-bonus-houqin.jar --spring.config.location=file:job_bootstrap.yml" +"bonus-file-${jar_version}-bonus-houqin.jar --spring.config.location=file:file_bootstrap.yml" +"bonus-visual-monitor-${jar_version}-bonus-houqin.jar --spring.config.location=file:visual_bootstrap.yml" +"bonus-smart-canteen.jar --spring.config.location=file:smart_canteen_bootstrap.yml") # 遍历数组并检查每个JAR文件的进程 for jar_with_args in "${jars[@]}"; do diff --git a/scripts_244_bonus_houqin_test/file_bootstrap.yml b/scripts_244_bonus_houqin_test/file_bootstrap.yml index 0ac2a662..b12b2ab8 100644 --- a/scripts_244_bonus_houqin_test/file_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/file_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38383 + port: 58583 # Spring spring: @@ -9,7 +9,7 @@ spring: name: bonus-file profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_bonus_houqin_test/gateway_bootstrap.yml b/scripts_244_bonus_houqin_test/gateway_bootstrap.yml index 50d064ae..ff1da460 100644 --- a/scripts_244_bonus_houqin_test/gateway_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/gateway_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38380 + port: 58580 servlet: context-path: zhgd # Spring @@ -10,7 +10,7 @@ spring: name: bonus-gateway profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -18,11 +18,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 @@ -41,7 +41,7 @@ spring: username: nacos password: bonus@Admin123 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin dataId: sentinel-bonus-gateway groupId: DEFAULT_GROUP data-type: json diff --git a/scripts_244_bonus_houqin_test/gen_bootstrap.yml b/scripts_244_bonus_houqin_test/gen_bootstrap.yml index 489dfeab..5b371e8f 100644 --- a/scripts_244_bonus_houqin_test/gen_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/gen_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38384 + port: 58584 # Spring spring: @@ -9,7 +9,7 @@ spring: name: bonus-gen profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_bonus_houqin_test/information-server.yml b/scripts_244_bonus_houqin_test/information-server.yml deleted file mode 100644 index 34dd46dd..00000000 --- a/scripts_244_bonus_houqin_test/information-server.yml +++ /dev/null @@ -1,344 +0,0 @@ -spring: - application: - name: information-server - - profiles: - active: smart_canteen_test - -server: - port: 49084 - -# 日志文件配置。注意,如果 logging.file.name 不放在 bootstrap.yaml 配置文件,而是放在 application.yaml 中,会导致出现 LOG_FILE_IS_UNDEFINED 文件 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - - ---- #################### 注册中心相关配置 #################### - -spring: - cloud: - nacos: - username: nacos - password: bonus@Admin123 - server-addr: 192.168.0.244:8848 - discovery: - namespace: smart_canteen # 命名空间。这里使用 dev 开发环境 - metadata: - version: 1.0.0 # 服务实例的版本号,可用于灰度发布 - ---- #################### 配置中心相关配置 #################### - -spring: - cloud: - nacos: - # Nacos Config 配置项,对应 NacosConfigProperties 配置属性类 - config: - server-addr: 192.168.0.244:8848 # Nacos 服务器地址 - namespace: smart_canteen # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境 - group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name - file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties - - - -spring: - main: - allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 - allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 - - # Servlet 配置 - servlet: - # 文件上传相关配置项 - multipart: - max-file-size: 16MB # 单个文件大小 - max-request-size: 32MB # 设置总上传的文件大小 - mvc: - pathmatch: - matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类 - - # Jackson 配置项 - jackson: - serialization: - write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳 - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 - fail-on-empty-beans: false # 允许序列化无属性的 Bean - - # Cache 配置项 - cache: - type: REDIS - redis: - time-to-live: 1h # 设置过期时间为 1 小时 - ---- #################### 接口文档配置 #################### - -springdoc: - api-docs: - enabled: true # 1. 是否开启 Swagger 接文档的元数据 - path: /v3/api-docs - swagger-ui: - enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 - path: /swagger-ui.html - default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 - -knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 - setting: - language: zh_cn - -# MyBatis Plus 的配置项 -mybatis-plus: - configuration: - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 - global-config: - db-config: - id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 - logic-delete-value: 1 # 逻辑已删除值(默认为 1) - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) - banner: false # 关闭控制台的 Banner 打印 - -mybatis-plus-join: - banner: false # 关闭控制台的 Banner 打印 - -# Spring Data Redis 配置 -spring: - data: - redis: - repositories: - enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度 - ---- #################### 定时任务相关配置 #################### - -xxl: - job: - executor: - appname: ${spring.application.name} # 执行器 AppName - logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 - accessToken: default_token # 执行器通讯TOKEN - - ---- #################### jysoft相关配置 #################### - -jysoft: - info: - version: 1.0.0 - base-package: com.jysoft.module.information - web: - admin-ui: - url: http://dashboard.jysoft.com # Admin 管理后台 UI 的地址 - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${jysoft.info.version} - base-package: ${jysoft.info.base-package} - captcha: - enable: false # 验证码的开关,默认为 true; - tenant: # 多租户相关配置项 - enable: true - ignore-urls: - - /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号 - - /admin-api/system/captcha/get-image # 获取图片验证码,和租户无关 - - /admin-api/system/captcha/get # 获取图片验证码,和租户无关 - - /admin-api/system/captcha/check # 校验图片验证码,和租户无关 - - /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号 - - /admin-api/system/auth/login # 账密登录,不需要租户编号 - - /rpc-api/system/tenant/valid # 防止递归。避免调用 /rpc-api/system/tenant/valid 接口时,又去触发 /rpc-api/system/tenant/valid 去校验 - - /rpc-api/system/tenant/id-list # 获得租户列表的时候,无需传递租户编号 - - /rpc-api/system/error-code/* # 错误码的自动创建与下载的接口,无法带上租户编号 - - /rpc-api/system/oauth2/token/check # 访问令牌校验时,无需传递租户编号;主要解决上传文件的场景,前端不会传递 tenant-id! - ignore-tables: - - system_tenant - - system_tenant_package - - system_dict_data - - system_dict_type - - system_error_code - - system_menu - - system_sms_channel - - system_sms_template - - system_sms_log - - system_sensitive_word - - system_oauth2_client - - system_mail_account - - system_mail_template - - system_mail_log - - system_notify_template - - app_menu - - app_role - - app_role_menu - - app_user_role - - green_dictionary_info - - green_calendar - - green_day - sms-code: # 短信验证码相关的配置项 - expire-times: 10m - send-frequency: 1m - send-maximum-quantity-per-day: 10 - begin-code: 9999 # 这里配置 9999 的原因是,测试方便。 - end-code: 9999 # 这里配置 9999 的原因是,测试方便。 - -debug: true - -ml: - mlurl: http://localhost:8080 -niu: - niupayurl: https://dev06.xnzn.net/tengyun-api/leopen/pay/device #测试地址食堂支付 - niusearchuserurl: https://dev06.xnzn.net/tengyun-api/leopen/customer/query #测试地址查询用户 - niupayreturnurl: https://dev06.xnzn.net/tengyun-api/leopen/pay/refund #测试地址食堂支付退钱 - applicationid: 104027978266054656 - applicationidpsw: 082d5733fc44443e992071b2bc916620 - sncode: 001 - serialnum: 02022840 - -#niu: -# niupayurl: http://10.138.55.106:58100/tengyun-api/leopen/pay/device #地址食堂支付 -# niusearchuserurl: http://10.138.55.106:58100/tengyun-api/leopen/customer/query #地址查询用户 -# niupayreturnurl: http://10.138.55.106:58100/tengyun-api/leopen/pay/refund #地址食堂支付退钱 -# applicationid: 396571655104630784 -# applicationidpsw: ee75c51b4a854c43ad9a85560f024068 -# sncode: 2ad34554g2 #虚拟支付设备 -# serialnum: 02022840 - - ---- #################### 数据库相关配置 #################### -spring: - # 数据源配置项 - autoconfigure: - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - - de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: - name: sbd-zhhq - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 -# url: jdbc:mysql://220.248.250.227:49961/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 - #url: jdbc:mysql://localhost:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 -# url: jdbc:mysql://10.138.55.104:13306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 -# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例 -# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 -# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 -# username: jysoft - username: root - password: root -# password: jysoft@sbd1 -# password: Jysoft@#2023 -# username: sa -# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W -# slave: # 模拟从库,可根据自己需要修改 -# name: roof-vue-pro -# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 -# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 -# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 -# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 -# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 -# username: root -# password: 123456 -# username: sa -# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W - - # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 - redis: - host: 127.0.0.1 # 地址 - port: 6379 # 端口 - database: 0 # 数据库索引 -# password: 123456 # 密码,建议生产环境开启 - ---- #################### MQ 消息队列相关配置 #################### -#spring: -# cloud: -# stream: -# rocketmq: -# # RocketMQ Binder 配置项,对应 RocketMQBinderConfigurationProperties 类 -# binder: -# name-server: 127.0.0.1:9876 # RocketMQ Namesrv 地址 -# binding-retry-interval: 7200 # 消息绑定重试间隔时间,单位:秒,默认为 30 秒。考虑到本地可能不启动 RocketMQ 服务,设置为 2 小时 - ---- #################### 定时任务相关配置 #################### - -xxl: - job: - enabled: false # 是否开启调度中心,默认为 true 开启 - admin: - addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址 - ---- #################### 服务保障相关配置 #################### - -# Lock4j 配置项 -lock4j: - acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒 - expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒 - ---- #################### 监控相关配置 #################### - - -# Spring Boot Admin 配置项 -spring: - boot: - admin: - # Spring Boot Admin Client 客户端的相关配置 - client: - instance: - service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME] - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - com.jysoft.information.web.mapper: debug - com.jysoft.information.app.mapper: debug - ---- #################### jysoft相关配置 #################### - -# jysoft配置项,设置当前项目所有自定义的配置 -jysoft: - env: # 多环境的配置项 - tag: ${HOSTNAME} - captcha: - enable: false # 本地环境,暂时关闭图片验证码,方便登录等接口的测试 - security: - mock-enable: true - xss: - enable: false - exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 - - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求 - - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求 - access-log: # 访问日志的配置项 - enable: false - -server: - tomcat: - initial-memory: 128m - max-memory: 256m diff --git a/scripts_244_bonus_houqin_test/job_bootstrap.yml b/scripts_244_bonus_houqin_test/job_bootstrap.yml index f9c10b7d..9911e751 100644 --- a/scripts_244_bonus_houqin_test/job_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/job_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38385 + port: 58585 # Spring spring: @@ -9,7 +9,7 @@ spring: name: bonus-job profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_bonus_houqin_test/kill-ps.sh b/scripts_244_bonus_houqin_test/kill-ps.sh index ea10c818..b34cc855 100644 --- a/scripts_244_bonus_houqin_test/kill-ps.sh +++ b/scripts_244_bonus_houqin_test/kill-ps.sh @@ -1,10 +1,10 @@ -AUTH_RESOURCE_NAME=bonus-auth-24.10.0-SNAPSHOT-smart-canteen.jar -GATEWAY_RESOURCE_NAME=bonus-gateway-24.10.0-SNAPSHOT-smart-canteen.jar -SYS_RESOURCE_NAME=bonus-system-24.10.0-SNAPSHOT-smart-canteen.jar -JOB_RESOURCE_NAME=bonus-job-24.10.0-SNAPSHOT-smart-canteen.jar -FILE_RESOURCE_NAME=bonus-file-24.10.0-SNAPSHOT-smart-canteen.jar -MONITOR_RESOURCE_NAME=bonus-visual-monitor-24.10.0-SNAPSHOT-smart-canteen.jar -SMART_CANTEEN_RESOURCE_NAME=bonus-smart-canteen.jar +AUTH_RESOURCE_NAME=bonus-auth-24.10.0-SNAPSHOT-bonus-houqin.jar +GATEWAY_RESOURCE_NAME=bonus-gateway-24.10.0-SNAPSHOT-bonus-houqin.jar +SYS_RESOURCE_NAME=bonus-system-24.10.0-SNAPSHOT-bonus-houqin.jar +JOB_RESOURCE_NAME=bonus-job-24.10.0-SNAPSHOT-bonus-houqin.jar +FILE_RESOURCE_NAME=bonus-file-24.10.0-SNAPSHOT-bonus-houqin.jar +MONITOR_RESOURCE_NAME=bonus-visual-monitor-24.10.0-SNAPSHOT-bonus-houqin.jar +SMART_CANTEEN_RESOURCE_NAME=bonus-bonus-houqin.jar BONUS_CUST_AUTH_RESOURCE_NAME=bonus-cust-auth.jar diff --git a/scripts_244_bonus_houqin_test/log-server.yml b/scripts_244_bonus_houqin_test/log-server.yml deleted file mode 100644 index e9c2a14e..00000000 --- a/scripts_244_bonus_houqin_test/log-server.yml +++ /dev/null @@ -1,217 +0,0 @@ -spring: - application: - name: log-server - - profiles: - active: smart_canteen_test - -server: - port: 49091 - -# 日志文件配置。注意,如果 logging.file.name 不放在 bootstrap.yaml 配置文件,而是放在 application.yaml 中,会导致出现 LOG_FILE_IS_UNDEFINED 文件 -logging: - file: - name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径 - ---- #################### 注册中心相关配置 #################### -spring: - cloud: - nacos: - username: nacos - password: bonus@Admin123 - server-addr: 192.168.0.244:8848 - discovery: - namespace: smart_canteen # 命名空间。这里使用 dev 开发环境 - metadata: - version: 1.0.0 # 服务实例的版本号,可用于灰度发布 - ---- #################### 配置中心相关配置 #################### -spring: - cloud: - nacos: - # Nacos Config 配置项,对应 NacosConfigProperties 配置属性类 - config: - server-addr: 192.168.0.244:8848 # Nacos 服务器地址 - namespace: smart_canteen # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境 - group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP - name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name - file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties - - -spring: - main: - allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 - allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务 - - mvc: - pathmatch: - matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类 - - # Jackson 配置项 - jackson: - serialization: - write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳 - write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 - write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 - fail-on-empty-beans: false # 允许序列化无属性的 Bean - - # Cache 配置项 - cache: - type: REDIS - redis: - time-to-live: 1h # 设置过期时间为 1 小时 - ---- #################### 接口文档配置 #################### - -springdoc: - api-docs: - enabled: true # 1. 是否开启 Swagger 接文档的元数据 - path: /v3/api-docs - swagger-ui: - enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面 - path: /swagger-ui.html - default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档 - -knife4j: - enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面 - setting: - language: zh_cn - -# MyBatis Plus 的配置项 -mybatis-plus: - configuration: - map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 - global-config: - db-config: - id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 - logic-delete-value: 1 # 逻辑已删除值(默认为 1) - logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) - banner: false # 关闭控制台的 Banner 打印 - encryptor: - password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 - -mybatis-plus-join: - banner: false # 关闭控制台的 Banner 打印 - -# Spring Data Redis 配置 -spring: - data: - redis: - repositories: - enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度 - ---- #################### jysoft相关配置 #################### - -jysoft: - info: - version: 1.0.0 - base-package: com.jysoft.module.log - web: - admin-ui: - url: http://dashboard.jysoft.com # Admin 管理后台 UI 的地址 - swagger: - title: 管理后台 - description: 提供审计日志管理 - version: ${jysoft.info.version} - base-package: ${jysoft.info.base-package} - tenant: # 多租户相关配置项 - enable: true - -debug: false - - ---- #################### 数据库相关配置 #################### -spring: - # 数据源配置项 - autoconfigure: - exclude: - - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源 - datasource: - druid: # Druid 【监控】相关的全局配置 - web-stat-filter: - enabled: true - stat-view-servlet: - enabled: true - allow: # 设置白名单,不填则允许所有访问 - url-pattern: /druid/* - login-username: # 控制台管理用户名和密码 - login-password: - filter: - stat: - enabled: true - log-slow-sql: true # 慢 SQL 记录 - slow-sql-millis: 100 - merge-sql: true - wall: - config: - multi-statement-allow: true - dynamic: # 多数据源配置 - druid: # Druid 【连接池】相关的全局配置 - initial-size: 1 # 初始连接数 - min-idle: 1 # 最小连接池数量 - max-active: 20 # 最大连接池数量 - max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒 - time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 - min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 - max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 - validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 - test-while-idle: true - test-on-borrow: false - test-on-return: false - primary: master - datasource: - master: -# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 -# url: jdbc:mysql://220.248.250.227:49961/sbd_zhhq?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 - url: jdbc:mysql://localhost:3306/sbd-zhhq?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 - # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.master.name} # PostgreSQL 连接的示例 - # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 - # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 -# username: jysoft - username: root - password: root -# password: Jysoft@#2023 -# username: sa -# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W -# slave: # 模拟从库,可根据自己需要修改 -# name: roof-vue-pro -# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 -# url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 -# url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 -# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 -# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 -# username: root -# password: 123456 -# username: sa -# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W - ---- #################### 监控相关配置 #################### - -# 日志文件配置 -logging: - level: - # 配置自己写的 MyBatis Mapper 打印日志 - com.jysoft.module.log.dal.mapper: debug - ---- #################### 定时任务配置多租户需求 #################### -xxl: - job: - enabled: false # 是否开启调度中心,默认为 true 开启 - admin: - addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址 - ---- #################### jysoft相关配置 #################### - -# jysoft配置项,设置当前项目所有自定义的配置 -jysoft: - env: # 多环境的配置项 - tag: ${HOSTNAME} - security: - mock-enable: true - access-log: # 访问日志的配置项 - enable: true -server: - tomcat: - initial-memory: 128m - max-memory: 256m - diff --git a/scripts_244_bonus_houqin_test/shared_station_bootstrap.yml b/scripts_244_bonus_houqin_test/shared_station_bootstrap.yml index ca6a7c45..75d45623 100644 --- a/scripts_244_bonus_houqin_test/shared_station_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/shared_station_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38389 + port: 58589 # Spring spring: servlet: @@ -14,7 +14,7 @@ spring: name: bonus-shared-station profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -22,11 +22,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_bonus_houqin_test/smart_canteen_bootstrap.yml b/scripts_244_bonus_houqin_test/smart_canteen_bootstrap.yml index c8f51563..257fcae4 100644 --- a/scripts_244_bonus_houqin_test/smart_canteen_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/smart_canteen_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38388 + port: 58588 # Spring spring: servlet: @@ -14,7 +14,7 @@ spring: name: bonus-smart-canteen profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -22,11 +22,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_bonus_houqin_test/system-server.yml b/scripts_244_bonus_houqin_test/system-server.yml deleted file mode 100644 index 108fc317..00000000 --- a/scripts_244_bonus_houqin_test/system-server.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Tomcat -server: - port: 48081 -# Spring -spring: - servlet: - multipart: - # 文件最大 - max-file-size: 20MB - # 设置总上传数据总大小 - max-request-size: 20MB - application: - # 应用名称 - name: system-server - profiles: - # 环境配置 - active: smart_canteen_test - cloud: - nacos: - username: nacos - password: bonus@Admin123 - discovery: - # 服务注册地址 - server-addr: 192.168.0.244:8848 - namespace: smart_canteen - config: - # 配置中心地址 - server-addr: 192.168.0.244:8848 - namespace: smart_canteen - # 配置文件格式 - file-extension: yml - # 共享配置 - shared-configs: - - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - - - - - diff --git a/scripts_244_bonus_houqin_test/system_bootstrap.yml b/scripts_244_bonus_houqin_test/system_bootstrap.yml index a315f32f..baacea68 100644 --- a/scripts_244_bonus_houqin_test/system_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/system_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38382 + port: 58582 # Spring spring: @@ -9,7 +9,7 @@ spring: name: bonus-system profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_bonus_houqin_test/visual_bootstrap.yml b/scripts_244_bonus_houqin_test/visual_bootstrap.yml index fa7c6dbe..bace2e0d 100644 --- a/scripts_244_bonus_houqin_test/visual_bootstrap.yml +++ b/scripts_244_bonus_houqin_test/visual_bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 38386 + port: 58586 # Spring spring: @@ -9,7 +9,7 @@ spring: name: bonus-monitor profiles: # 环境配置 - active: smart_canteen_test + active: bonus_houqin_test cloud: nacos: username: nacos @@ -17,11 +17,11 @@ spring: discovery: # 服务注册地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin config: # 配置中心地址 server-addr: 192.168.0.244:8848 - namespace: smart_canteen + namespace: bonus_houqin # 配置文件格式 file-extension: yml # 共享配置 diff --git a/scripts_244_smart_canteen_test/deploy.sh b/scripts_244_smart_canteen_test/deploy.sh index 467b5d96..6fb62b79 100644 --- a/scripts_244_smart_canteen_test/deploy.sh +++ b/scripts_244_smart_canteen_test/deploy.sh @@ -3,7 +3,7 @@ suffix="-smart-canteen" jar_version="24.10.0-SNAPSHOT" export deploy_path=/opt/webapps/bonus-smart-canteen -export app_workspace=/opt/builds/releases/Bonus-Cloud/${jar_version} +export app_workspace=/opt/builds/releases/Bonus-Cloud-Smart-Canteen-Temp/${jar_version} export biz_workspace=/opt/install/jenkins_home/workspace/Bonus-Cloud-Smart-Canteen app_source_jars=(