Skip to content

Commit d0f0153

Browse files
committed
Create MongoConfiguration.java
1 parent e3febc0 commit d0f0153

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package fr.insee.genesis.configuration;
2+
3+
import lombok.NonNull;
4+
import org.springframework.context.annotation.Configuration;
5+
import org.springframework.data.mongodb.config.AbstractMongoClientConfiguration;
6+
7+
@Configuration
8+
public class MongoConfiguration extends AbstractMongoClientConfiguration {
9+
@Override
10+
@NonNull
11+
protected String getDatabaseName() {
12+
return "CollectedDataRepository";
13+
}
14+
15+
@Override
16+
public boolean autoIndexCreation() {
17+
return true;
18+
}
19+
}

0 commit comments

Comments
 (0)