From 4a1a66ccd4d1ab262bc2c59a82e6d9a109f77599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Wed, 12 Jun 2024 15:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20=E5=8D=95=E4=BD=93=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E9=85=8D=E7=BD=AE=20sentinel=20=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 5ac2caeac78ae2de8376412580e16277a3aa3600) --- pigx-boot/src/main/resources/application.yml | 47 +++++++++++--------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/pigx-boot/src/main/resources/application.yml b/pigx-boot/src/main/resources/application.yml index 89026b98c..47a22b881 100644 --- a/pigx-boot/src/main/resources/application.yml +++ b/pigx-boot/src/main/resources/application.yml @@ -1,31 +1,36 @@ server: - port: 9999 # 项目端口 + port: 9999 servlet: - context-path: /admin # 项目访问路径 + context-path: /admin spring: application: - name: @project.artifactId@ # 服务名称,取 pom.xml 中的 artifactId + name: @project.artifactId@ + # 缓存相关配置 + cache: + type: redis # 上传文件大小限制 servlet: multipart: - max-file-size: 100MB # 单个文件最大 - max-request-size: 100MB # 接收的最大请求大小 + max-file-size: 100MB + max-request-size: 100MB cloud: - nacos: # 单机版本关闭nacos 服务发现和配置管理的能力 + nacos: config: enabled: false discovery: enabled: false gateway: enabled: false + redis.enabled: false + sentinel: + enabled: false main: - allow-bean-definition-overriding: true # 允许覆盖bean定义 + allow-bean-definition-overriding: true profiles: - active: dev # 激活dev,对应 application-dev.yml + active: dev,ai - -## spring security 对外暴露接口设置(不鉴权直接可访问) +## spring security 对外暴露接口设置 security: micro: false oauth2: @@ -46,16 +51,18 @@ security: #--------------如下配置尽量不要变动------------- # mybatis-plus 配置 mybatis-plus: - mapper-locations: classpath*:/mapper/*Mapper.xml # mapper文件位置 + mapper-locations: classpath*:/mapper/*Mapper.xml global-config: - banner: false # 是否打印 mybatis-plus banner + banner: false db-config: - id-type: auto # 主键类型 - where-strategy: not_empty # where 条件策略 - insert-strategy: not_empty # 插入策略 - update-strategy: not_null # 更新策略 - type-handlers-package: com.pig4cloud.pigx.common.data.handler # 类型处理器包 + id-type: auto + where-strategy: not_empty + insert-strategy: not_empty + update-strategy: not_null + type-handlers-package: com.pig4cloud.pigx.common.data.handler configuration: - jdbc-type-for-null: 'null' # 是否设置字段为null - call-setters-on-nulls: true # 是否调用set方法时传入null值 - shrink-whitespaces-in-sql: true # 去掉sql中多余的空格 + jdbc-type-for-null: 'null' + call-setters-on-nulls: true + shrink-whitespaces-in-sql: true +mybatis-plus-join: + banner: false