Merge branch '3.0.x' into 3.1.x

3.1.x
Andy Wilkinson 1 year ago
commit 385e6278b7

@ -26,9 +26,7 @@ import org.springframework.boot.LazyInitializationExcludeFilter;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener;
import org.springframework.boot.jdbc.DataSourceBuilder; import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.boot.logging.LogLevel;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.AdviceMode;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -184,12 +182,10 @@ class TransactionAutoConfigurationTests {
@Test @Test
void excludesAbstractTransactionAspectFromLazyInit() { void excludesAbstractTransactionAspectFromLazyInit() {
this.contextRunner.withUserConfiguration(AspectJTransactionManagementConfiguration.class) this.contextRunner.withUserConfiguration(AspectJTransactionManagementConfiguration.class).run((context) -> {
.withInitializer(new ConditionEvaluationReportLoggingListener(LogLevel.INFO)) LazyInitializationExcludeFilter filter = context.getBean(LazyInitializationExcludeFilter.class);
.run((context) -> { assertThat(filter.isExcluded(null, null, AbstractTransactionAspect.class)).isTrue();
LazyInitializationExcludeFilter filter = context.getBean(LazyInitializationExcludeFilter.class); });
assertThat(filter.isExcluded(null, null, AbstractTransactionAspect.class)).isTrue();
});
} }
@Configuration @Configuration

Loading…
Cancel
Save