server: port: 19007 spring: application: name: emotion-websocket profiles: active: ${SPRING_PROFILES_ACTIVE:local} # 数据源配置 datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/emotion_museum?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true username: root password: EmotionMuseum2025*# druid: initial-size: 5 min-idle: 5 max-active: 20 max-wait: 60000 time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 300000 validation-query: SELECT 1 FROM DUAL test-while-idle: true test-on-borrow: false test-on-return: false pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 filters: stat,wall,slf4j connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 # Redis配置 redis: host: localhost port: 6379 password: database: 0 timeout: 5000ms lettuce: pool: max-active: 20 max-idle: 10 min-idle: 0 max-wait: -1ms # MyBatis Plus配置 mybatis-plus: configuration: map-underscore-to-camel-case: true cache-enabled: false call-setters-on-nulls: true jdbc-type-for-null: 'null' global-config: db-config: id-type: ASSIGN_ID logic-delete-field: is_deleted logic-delete-value: 1 logic-not-delete-value: 0 mapper-locations: classpath*:mapper/**/*Mapper.xml # 日志配置 logging: level: com.emotionmuseum.websocket: DEBUG org.springframework.web.socket: DEBUG org.springframework.messaging: DEBUG pattern: console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n" file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n" file: name: logs/emotion-websocket.log # 监控配置 management: endpoints: web: exposure: include: health,info,metrics,prometheus endpoint: health: show-details: always metrics: export: prometheus: enabled: true