fix: exclude embedded autoconfig, remove unused boot class (#12707)

This commit is contained in:
lucaCambi77 2022-09-10 20:01:00 +02:00 committed by GitHub
parent 63249f5339
commit 8066e08c68
5 changed files with 8 additions and 17 deletions

View File

@ -2,11 +2,12 @@ package com.baeldung.boot.collection.name;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
@SpringBootApplication @SpringBootApplication(exclude = EmbeddedMongoAutoConfiguration.class)
@PropertySource("classpath:boot.collection.name/app.properties") @PropertySource("classpath:boot.collection.name/app.properties")
@EnableMongoRepositories(basePackages = { "com.baeldung.boot.collection.name" }) @EnableMongoRepositories(basePackages = { "com.baeldung.boot.collection.name" })
public class SpringBootCollectionNameApplication { public class SpringBootCollectionNameApplication {

View File

@ -2,9 +2,10 @@ package com.baeldung.boot.composite.key;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
@SpringBootApplication @SpringBootApplication(exclude = EmbeddedMongoAutoConfiguration.class)
@EnableMongoRepositories(basePackages = { "com.baeldung.boot.composite.key" }) @EnableMongoRepositories(basePackages = { "com.baeldung.boot.composite.key" })
public class SpringBootCompositeKeyApplication { public class SpringBootCompositeKeyApplication {
public static void main(String... args) { public static void main(String... args) {

View File

@ -2,9 +2,10 @@ package com.baeldung.boot.count;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
@SpringBootApplication @SpringBootApplication(exclude = EmbeddedMongoAutoConfiguration.class)
@EnableMongoRepositories(basePackages = { "com.baeldung.boot.count" }) @EnableMongoRepositories(basePackages = { "com.baeldung.boot.count" })
public class SpringBootCountApplication { public class SpringBootCountApplication {
public static void main(String... args) { public static void main(String... args) {

View File

@ -2,10 +2,11 @@ package com.baeldung.boot.unique.field;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
@SpringBootApplication @SpringBootApplication(exclude = EmbeddedMongoAutoConfiguration.class)
@PropertySource("classpath:boot.unique.field/app.properties") @PropertySource("classpath:boot.unique.field/app.properties")
@EnableMongoRepositories(basePackages = { "com.baeldung.boot.unique.field" }) @EnableMongoRepositories(basePackages = { "com.baeldung.boot.unique.field" })
public class SpringBootUniqueFieldApplication { public class SpringBootUniqueFieldApplication {

View File

@ -1,13 +0,0 @@
package com.baeldung.logging;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootPersistenceApplication {
public static void main(String ... args) {
SpringApplication.run(SpringBootPersistenceApplication.class, args);
}
}