CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Reposted on 2018-11-18
by Mis94

Original Post

Original - Posted on 2018-11-18
by Mis94



            
Present in both answers; Present only in the new answer; Present only in the old answer;

If you don't care about your in async mode, you can disable the @async configuration at all (run your test synchronously)
Create your async configuration class:
@Configuration @EnableAsync @ConditionalOnProperty(name = "async.enabled", havingValue = "true") public class SpringAsyncConfig { // Your configuration here }
the annotation `@ConditionalOnProperty` here will create this bean if only the configuration value `async.enabled` is `true`
Then in the configuration file if you are going to run the integration test you can set the value to false
`async.enabled = false`
or if you are using Spring profiles you can always set the value to `true` in other profiles configuration files like `application.properties`, `application-dev` and set to `false` in `application-integration.properties`
Create your async configuration class:
@Configuration @EnableAsync @ConditionalOnProperty(name = "async.enabled", havingValue = "true") public class SpringAsyncConfig { // Your configuration here }
the annotation `@ConditionalOnProperty` here will create this bean if only the configuration value `async.enabled` is `true`
Then in the configuration file if you are going to run the integration test you can set the value to false
`async.enabled = false`
or if you are using Spring profiles you can always set the value to `true` in other profiles configuration files like `application.properties`, `application-dev` and set to `false` in `application-integration.properties`

        
Present in both answers; Present only in the new answer; Present only in the old answer;