From 3da0e49b38492a2eb916bc5bc4d61f73203481a0 Mon Sep 17 00:00:00 2001 From: wh Date: Thu, 9 Apr 2026 13:12:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(init):=20=E6=B7=BB=E5=8A=A0=20application.?= =?UTF-8?q?yml=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=20(T005)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 68 ++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/main/resources/application.yml diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..76c49bc --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,68 @@ +server: + port: 8080 + +spring: + datasource: + url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/label_db} + username: ${SPRING_DATASOURCE_USERNAME:label} + password: ${SPRING_DATASOURCE_PASSWORD:label_password} + driver-class-name: org.postgresql.Driver + hikari: + maximum-pool-size: 20 + minimum-idle: 5 + connection-timeout: 30000 + + data: + redis: + host: ${SPRING_DATA_REDIS_HOST:localhost} + port: ${SPRING_DATA_REDIS_PORT:6379} + password: ${SPRING_DATA_REDIS_PASSWORD:redis_password} + timeout: 5000ms + lettuce: + pool: + max-active: 8 + max-idle: 8 + min-idle: 0 + + jackson: + default-property-inclusion: non_null + serialization: + write-dates-as-timestamps: false + + mvc: + pathmatch: + matching-strategy: ant_path_matcher # Shiro 与 Spring Boot 3 兼容性需要 + +mybatis-plus: + mapper-locations: classpath*:mapper/**/*.xml + type-aliases-package: com.label.module + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl + global-config: + db-config: + id-type: auto + +rustfs: + endpoint: ${RUSTFS_ENDPOINT:http://localhost:9000} + access-key: ${RUSTFS_ACCESS_KEY:minioadmin} + secret-key: ${RUSTFS_SECRET_KEY:minioadmin} + region: us-east-1 + +ai-service: + base-url: ${AI_SERVICE_BASE_URL:http://localhost:8000} + timeout: 30000 # milliseconds + +shiro: + loginUrl: /api/auth/login + successUrl: / + unauthorizedUrl: /api/auth/unauthorized + sessionManager: + sessionIdCookieEnabled: false # REST API,不使用基于 Cookie 的会话 + sessionIdUrlRewritingEnabled: false + +logging: + level: + com.label: DEBUG + org.apache.shiro: INFO + com.baomidou.mybatisplus: INFO