From 04be1b9784fda38958576a9afd502356b7c3cf95 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 13 Sep 2018 12:24:49 +0200 Subject: [PATCH] #408 - Remove Dev-Tools exclusions for multiple datasources. Cleanup our examples as the issues that required exclusion are solved now. --- .../jpa/multipleds/Application.java | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/Application.java b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/Application.java index 63c0784f..42996125 100644 --- a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/Application.java +++ b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/Application.java @@ -22,30 +22,17 @@ import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; -import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; -import org.springframework.boot.devtools.autoconfigure.DevToolsDataSourceAutoConfiguration; import org.springframework.transaction.annotation.EnableTransactionManagement; /** - * Core Spring Boot application configuration. Note, that we explicitly deactivate some auto-configurations explicitly. - * They mostly will even disable automatically if special bean names are used (e.g. {@code entityManagerFactory}) but I - * wanted to keep the two configurations symmetric. The configuration classes being located in separate packages serves - * the purpose of scoping the Spring Data repository scanning to those packages so that the infrastructure setup is - * attached to the corresponding repository instances. - *

- * {@link DevToolsDataSourceAutoConfiguration} is explicitly excluded until - * {@link https://github.com/spring-projects/spring-boot/issues/5540} is fixed. - * {@link https://github.com/spring-projects/spring-boot/issues/5541} has been filed to improve the need for manual - * exclusions in general. + * Core Spring Boot application configuration. * * @author Oliver Gierke + * @author Mark Paluch * @see example.springdata.jpa.multipleds.customer.CustomerConfig * @see example.springdata.jpa.multipleds.order.OrderConfig */ -@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, - DataSourceTransactionManagerAutoConfiguration.class }) +@SpringBootApplication @EnableTransactionManagement public class Application {