diff --git a/build.gradle b/build.gradle index ef188b9..b8168a9 100644 --- a/build.gradle +++ b/build.gradle @@ -36,13 +36,14 @@ dependencies { implementation 'cn.dev33:sa-token-spring-boot-starter:1.44.0' // 权限认证 implementation 'com.alibaba:druid-spring-boot-starter:1.2.27' // 数据库连接池 implementation 'org.lionsoul:ip2region:2.7.0' // IP 归属地 + implementation 'org.springframework.boot:spring-boot-starter-data-mongodb' // mongodb compileOnly 'org.projectlombok:lombok' // Lombok developmentOnly 'org.springframework.boot:spring-boot-devtools' // 热重载 runtimeOnly 'com.mysql:mysql-connector-j' // MySQL 驱动 annotationProcessor 'org.projectlombok:lombok' // Lombok 注解处理 testImplementation 'org.springframework.boot:spring-boot-starter-test' // 测试框架 implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' // thymeleaf模版引擎 - implementation 'com.aliyun.oss:aliyun-sdk-oss:3.15.1' // OSS SDK + implementation 'com.aliyun.oss:aliyun-sdk-oss:3.17.4' // OSS SDK } tasks.named('test') { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f010108..a92ac79 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -45,6 +45,11 @@ spring.redis.lettuce.pool.max-idle=8 spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.max-wait=-1ms +# MongoDB 配置 +spring.data.mongodb.host=120.24.204.180 +spring.data.mongodb.database=app +spring.data.mongodb.port=27017 + # Sa-Token 配置 sa-token.token-name=Authorization sa-token.timeout=2592000