pls work part 2
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m54s
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m54s
This commit is contained in:
parent
6096764905
commit
03c679d25c
@ -1,22 +1,15 @@
|
||||
package xyz.mcutils.backend.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.convert.DbRefResolver;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
|
||||
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
|
||||
|
||||
@Configuration
|
||||
@EnableMongoRepositories(basePackages = "xyz.mcutils.backend.repository.mongo")
|
||||
public class MongoConfig {
|
||||
@Bean
|
||||
public MappingMongoConverter mongoConverter(MongoDatabaseFactory databaseFactory, MongoMappingContext mongoMappingContext) {
|
||||
DbRefResolver dbRefResolver = new DefaultDbRefResolver(databaseFactory);
|
||||
MappingMongoConverter mongoConverter = new MappingMongoConverter(dbRefResolver, mongoMappingContext);
|
||||
mongoConverter.setMapKeyDotReplacement("-DOT");
|
||||
return mongoConverter;
|
||||
@Autowired
|
||||
void setMapKeyDotReplacement(MappingMongoConverter mappingMongoConverter) {
|
||||
mappingMongoConverter.setMapKeyDotReplacement("-DOT");
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import xyz.mcutils.backend.common.EnvironmentUtils;
|
||||
import xyz.mcutils.backend.common.Timer;
|
||||
import xyz.mcutils.backend.config.Config;
|
||||
import xyz.mcutils.backend.repository.mongo.MetricsRepository;
|
||||
import xyz.mcutils.backend.service.metric.Metric;
|
||||
import xyz.mcutils.backend.service.metric.metrics.*;
|
||||
|
@ -18,7 +18,6 @@ import xyz.mcutils.backend.common.Endpoint;
|
||||
import xyz.mcutils.backend.common.EnvironmentUtils;
|
||||
import xyz.mcutils.backend.common.ExpiringSet;
|
||||
import xyz.mcutils.backend.common.WebRequest;
|
||||
import xyz.mcutils.backend.config.Config;
|
||||
import xyz.mcutils.backend.model.cache.CachedEndpointStatus;
|
||||
import xyz.mcutils.backend.model.mojang.EndpointStatus;
|
||||
import xyz.mcutils.backend.model.token.MojangProfileToken;
|
||||
|
@ -4,7 +4,6 @@ import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import xyz.mcutils.backend.common.*;
|
||||
import xyz.mcutils.backend.config.Config;
|
||||
import xyz.mcutils.backend.exception.impl.BadRequestException;
|
||||
import xyz.mcutils.backend.exception.impl.MojangAPIRateLimitException;
|
||||
import xyz.mcutils.backend.exception.impl.RateLimitException;
|
||||
|
@ -6,7 +6,6 @@ import org.springframework.stereotype.Service;
|
||||
import xyz.mcutils.backend.common.DNSUtils;
|
||||
import xyz.mcutils.backend.common.EnumUtils;
|
||||
import xyz.mcutils.backend.common.EnvironmentUtils;
|
||||
import xyz.mcutils.backend.config.Config;
|
||||
import xyz.mcutils.backend.exception.impl.BadRequestException;
|
||||
import xyz.mcutils.backend.exception.impl.ResourceNotFoundException;
|
||||
import xyz.mcutils.backend.model.cache.CachedMinecraftServer;
|
||||
|
@ -3,8 +3,6 @@ package xyz.mcutils.backend.test.tests;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo;
|
||||
import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.http.MediaType;
|
||||
|
@ -3,8 +3,6 @@ package xyz.mcutils.backend.test.tests;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo;
|
||||
import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.http.MediaType;
|
||||
|
Loading…
x
Reference in New Issue
Block a user