File tree Expand file tree Collapse file tree 2 files changed +0
-29
lines changed
spring-boot-project/spring-boot-autoconfigure/src
main/java/org/springframework/boot/autoconfigure/batch
test/java/org/springframework/boot/autoconfigure/batch Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Original file line number Diff line number Diff line change 2020
2121import javax .sql .DataSource ;
2222
23- import org .springframework .batch .core .configuration .BatchConfigurationException ;
2423import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
2524import org .springframework .batch .core .configuration .support .DefaultBatchConfiguration ;
2625import org .springframework .batch .core .explore .JobExplorer ;
@@ -130,13 +129,6 @@ protected DataSource getDataSource() {
130129 return this .dataSource ;
131130 }
132131
133- @ Bean
134- @ ConditionalOnMissingBean
135- @ Override
136- public JobRepository jobRepository () throws BatchConfigurationException {
137- return super .jobRepository ();
138- }
139-
140132 @ Override
141133 protected PlatformTransactionManager getTransactionManager () {
142134 return this .transactionManager ;
Original file line number Diff line number Diff line change @@ -517,13 +517,6 @@ void defaultExecutionContextSerializerIsUsed() {
517517 });
518518 }
519519
520- @ Test
521- void defaultJobRepositoryIsNotCreatedWhenUserDefinedJobRepositoryBean () {
522- this .contextRunner
523- .withUserConfiguration (TestConfigurationWithJobRepository .class , EmbeddedDataSourceConfiguration .class )
524- .run ((context ) -> assertThat (context ).hasSingleBean (TestJobRepository .class ));
525- }
526-
527520 private JobLauncherApplicationRunner createInstance (String ... registeredJobNames ) {
528521 JobLauncherApplicationRunner runner = new JobLauncherApplicationRunner (mock (JobLauncher .class ),
529522 mock (JobExplorer .class ), mock (JobRepository .class ));
@@ -603,16 +596,6 @@ static class TestConfiguration {
603596
604597 }
605598
606- @ TestAutoConfigurationPackage (City .class )
607- static class TestConfigurationWithJobRepository {
608-
609- @ Bean
610- TestJobRepository jobRepository () {
611- return mock (TestJobRepository .class );
612- }
613-
614- }
615-
616599 @ Configuration (proxyBeanMethods = false )
617600 static class EntityManagerFactoryConfiguration {
618601
@@ -897,8 +880,4 @@ ExecutionContextSerializer executionContextSerializer() {
897880
898881 }
899882
900- interface TestJobRepository extends JobRepository {
901-
902- }
903-
904883}
You can’t perform that action at this time.
0 commit comments