메모리 초과 처리

This commit is contained in:
2025-04-10 11:55:51 +09:00
parent 4e0304899c
commit 67d0b277de
3 changed files with 12 additions and 3 deletions

View File

@@ -73,7 +73,10 @@ public class BusinessLogUserCreateService extends BusinessLogServiceBase {
)
);
Aggregation aggregation = Aggregation.newAggregation(operations);
AggregationOptions options = AggregationOptions.builder()
.allowDiskUse(true)
.build();
Aggregation aggregation = Aggregation.newAggregation(operations).withOptions(options);
log.info("loadBusinessLogData UserCreate Query: {}", aggregation);
AggregationResults<T> results = getMongoTemplate().aggregate(aggregation, AdminConstants.MONGO_DB_COLLECTION_LOG, class1);

View File

@@ -239,7 +239,10 @@ public class BusinessLogUserLoginMultiService extends BusinessLogServiceBase {
)
);
Aggregation aggregation = Aggregation.newAggregation(operations);
AggregationOptions options = AggregationOptions.builder()
.allowDiskUse(true)
.build();
Aggregation aggregation = Aggregation.newAggregation(operations).withOptions(options);
log.info("loadBusinessLogData UserLoginMulti Query: {}", aggregation);
AggregationResults<T> results = getMongoTemplate().aggregate(aggregation, AdminConstants.MONGO_DB_COLLECTION_LOG, class1);

View File

@@ -177,7 +177,10 @@ public class BusinessLogUserLoginService extends BusinessLogServiceBase {
)
);
Aggregation aggregation = Aggregation.newAggregation(operations);
AggregationOptions options = AggregationOptions.builder()
.allowDiskUse(true)
.build();
Aggregation aggregation = Aggregation.newAggregation(operations).withOptions(options);
log.info("loadBusinessLogData UserLogin Query: {}", aggregation);
AggregationResults<T> results = getMongoTemplate().aggregate(aggregation, AdminConstants.MONGO_DB_COLLECTION_LOG, class1);