# =================== 开发环境配置 =================== spring: config: activate: on-profile: dev datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://${DB_HOST:8.148.151.56}:${DB_PORT:3306}/reading_platform?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true username: ${DB_USERNAME:root} password: ${DB_PASSWORD:reading_platform_pwd} type: com.alibaba.druid.pool.DruidDataSource data: redis: host: ${REDIS_HOST:8.148.151.56} port: ${REDIS_PORT:6379} password: ${REDIS_PASSWORD:} database: 0 timeout: 5000ms lettuce: pool: max-active: 8 max-wait: -1ms max-idle: 8 min-idle: 0 flyway: enabled: true locations: classpath:db/migration clean-disabled: true validate-on-migrate: false baseline-on-migrate: false # Druid 连接池配置(开发环境) druid: initial-size: 5 min-idle: 5 max-active: 20 max-wait: 60000ms time-between-eviction-runs-millis: 60000ms min-evictable-idle-time-millis: 300000ms validation-query: SELECT 1 test-while-idle: true test-on-borrow: false test-on-return: false pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 stat-view-servlet: enabled: true url-pattern: /druid/* reset-enable: false login-username: admin login-password: admin web-stat-filter: enabled: true url-pattern: /* exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" # MyBatis-Plus 配置(开发环境 - 开启 SQL 日志) mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # JWT 配置(开发环境 - 使用默认密钥) jwt: secret: ${JWT_SECRET:dev-secret-key-for-development-only-reading-platform-2024} expiration: ${JWT_EXPIRATION:86400000} # 日志配置(开发环境 - DEBUG 级别) logging: level: root: INFO com.reading.platform: DEBUG com.baomidou.mybatisplus: DEBUG org.springframework: WARN