|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2019 the original author or authors. |
|
|
|
* Copyright 2002-2023 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -94,20 +94,20 @@ class MultipleDataSourcesAndTransactionManagersTransactionalSqlScriptsTests { |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
DataSource dataSource1() { |
|
|
|
DataSource dataSource1() { |
|
|
|
return new EmbeddedDatabaseBuilder()//
|
|
|
|
return new EmbeddedDatabaseBuilder() |
|
|
|
.setName("database1")//
|
|
|
|
.generateUniqueName(true) |
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/schema.sql")//
|
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/schema.sql") |
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/data.sql")//
|
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/data.sql") |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
DataSource dataSource2() { |
|
|
|
DataSource dataSource2() { |
|
|
|
return new EmbeddedDatabaseBuilder()//
|
|
|
|
return new EmbeddedDatabaseBuilder() |
|
|
|
.setName("database2")//
|
|
|
|
.generateUniqueName(true) |
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/schema.sql")//
|
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/schema.sql") |
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/data.sql")//
|
|
|
|
.addScript("classpath:/org/springframework/test/context/jdbc/data.sql") |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|