厚浪云知识库|汇集厚浪云最新消息及常见问题

厚浪云知识库|汇集厚浪云最新消息及常见问题

首页
公告
已知问题
登录 →
厚浪云知识库|汇集厚浪云最新消息及常见问题

厚浪云知识库|汇集厚浪云最新消息及常见问题

首页 公告 已知问题
登录
  1. 首页
  2. 厚浪云
  3. 厚浪4 域名系统
  4. 厚浪4·Newlangs·application.yml配置功能详解

厚浪4·Newlangs·application.yml配置功能详解

0
  • 厚浪4 域名系统
  • 发布于 2024-10-27
  • 157 次阅读
厚浪云
厚浪云

在Java Spring Boot项目中,application.yml文件用于配置应用程序的各种属性。以下为厚浪4系统中application.yml 的配置示例以及对应功能

server:
  port: 8080
  # 服务器端口设置

  compression:
    enabled: true
    # 启用HTTP响应压缩

    min-response-size: 512
    # 设置压缩的最小响应大小

  error:
    include-stacktrace: always
    # 错误信息中始终包含堆栈跟踪

    include-exception: true
    # 错误信息中始终包含异常细节

spring:
  main:
    allow-circular-references: true
    # 允许Spring应用中出现循环引用

  application:
    name: newlangs
    # 设置Spring应用的名称为newlangs

  datasource:
    druid:
      driver-class-name: com.mysql.jdbc.Driver
      # 使用MySQL JDBC驱动

      url: jdbc:mysql://localhost:3306/数据库名?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
      # 数据库连接URL,连接到本地MySQL数据库,设置时区、编码等参数

      username: 数据库用户名
      # 数据库用户名

      password: 数据库密码
      # 数据库密码

  redis:
    database: 0
    # 使用Redis的第0个数据库

    host: localhost
    # Redis服务器地址为localhost

    port: 6379
    # Redis服务器端口为6379

    timeout: 3s
    # Redis连接超时时间为3秒

    lettuce:
      pool:
        max-active: 200
        # Redis连接池的最大活跃连接数为200

        max-wait: -1ms
        # Redis连接池最大等待时间为-1毫秒,表示无限等待

        max-idle: 10
        # Redis连接池的最大空闲连接数为10

        min-idle: 0
        # Redis连接池的最小空闲连接数为0

mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    # MyBatis日志实现类,使用标准输出

sa-token:
    token-name: accessToken
    # token名称,也作为cookie名称

    timeout: 1209600
    # token有效期为1209600秒(14天)

    active-timeout: 86400
    # token最低活跃频率为86400秒(1天),超过此时间未访问则被冻结

    is-concurrent: true
    # 允许同一账号多地同时登录

    is-share: false
    # 多人登录同一账号时不共用一个token

    token-style: tik
    # token的风格设置为tik

    is-log: false
    # 不输出操作日志

标签: #知识库 9 #开发 2 #二级域名分发系统 1
相关文章

厚浪4·Newlangs·application.yml配置功能详解 2024-10-27 08:00

在Java Spring Boot项目中,application.yml文件用于配置应用程序的各种属性。以下为厚浪4系统中application.yml 的配置示例以及对应功能 server: port: 8080 # 服务器端口设置 compression: enabled:

目录
浙ICP备2024068645号-4