CopyPastor

Detecting plagiarism made easy.

Score: 0.9009069689420554; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2025-05-23
by IniasP

Original Post

Original - Posted on 2025-05-23
by IniasP



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

As of Spring Boot [**3.5.0**](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.5-Release-Notes#miscellaneous), `@ConditionalOnProperty` and the new `@ConditionalOnBooleanProperty` are `@Repeatable`.
For example ```java @ConditionalOnProperty("property1", havingValue = "value1") @ConditionalOnBooleanProperty("property2") @ConditionalOnBooleanProperty("property3", havingValue = false) ``` will require that `property1=value1`, `property2=true`, `property3=false`.
Note that `@ConditionalOnExpression` is still *not* `@Repeatable`, but it's no longer needed to achieve the desired behavior.
As of Spring Boot [**3.5.0**](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.5-Release-Notes#miscellaneous), `@ConditionalOnProperty` and the new `@ConditionalOnBooleanProperty` are `@Repeatable`. That means, for your example, you could use: ```java @ConditionalOnBooleanProperty("property1") @ConditionalOnBooleanProperty("property2", havingValue = false) ``` This will require both conditions to be satisfied.
Note that `@ConditionalOnExpression` is still *not* `@Repeatable`, but it's no longer needed to achieve the desired behavior.

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