@@ -19047,20 +19047,20 @@ When `TransferServiceTest` is run, its `ApplicationContext` will be loaded from
1904719047`app-config.xml` configuration file in the root of the classpath. If you inspect
1904819048`app-config.xml` you'll notice that the `accountRepository` bean has a dependency on a
1904919049`dataSource` bean; however, `dataSource` is not defined as a top-level bean. Instead,
19050- `dataSource` is defined three times, that is the __production__ profile, the
19051- __dev__ profile and the __default__ profile.
19050+ `dataSource` is defined three times: in the __production__ profile, the
19051+ __dev__ profile, and the __default__ profile.
1905219052
1905319053By annotating `TransferServiceTest` with `@ActiveProfiles("dev")` we instruct the Spring
1905419054TestContext Framework to load the `ApplicationContext` with the active profiles set to
19055- `{"dev"}`. As a result, an embedded database will be created, and the
19056- `accountRepository` bean will be wired with a reference to the development `DataSource`.
19057- And that's likely what we want in an integration test.
19055+ `{"dev"}`. As a result, an embedded database will be created and populated with test data,
19056+ and the `accountRepository` bean will be wired with a reference to the development
19057+ `DataSource`. And that's likely what we want in an integration test.
1905819058
1905919059It is sometimes useful to assign beans to a `default` profile. Beans within the default profile
1906019060are only included when no other profile is specifically activated. This can be used to define
1906119061_fallback_ beans to be used in the application's default state. For example, you may
1906219062explicitly provide a data source for `dev` and `production` profiles, but define an in-memory
19063- data source as a default when neither of these are specified .
19063+ data source as a default when neither of these is active .
1906419064
1906519065The following code listings demonstrate how to implement the same configuration and
1906619066integration test but using `@Configuration` classes instead of XML.
0 commit comments