mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-05 16:59:28 +00:00
Merge branch '3.5.x' into 4.0.x
Closes gh-50611
This commit is contained in:
+1
-1
@@ -478,7 +478,7 @@ public class RabbitProperties {
|
||||
* @see #getEnabled() ()
|
||||
*/
|
||||
public boolean determineEnabled() {
|
||||
boolean defaultEnabled = Boolean.TRUE.equals(getEnabled()) || this.bundle != null;
|
||||
boolean defaultEnabled = Boolean.TRUE.equals(getEnabled()) || StringUtils.hasText(this.bundle);
|
||||
if (CollectionUtils.isEmpty(RabbitProperties.this.parsedAddresses)) {
|
||||
return defaultEnabled;
|
||||
}
|
||||
|
||||
+6
@@ -335,6 +335,12 @@ class RabbitPropertiesTests {
|
||||
assertThat(this.properties.getSsl().determineEnabled()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void determineSslEnabledIsFalseWhenBundleIsEmpty() {
|
||||
this.properties.getSsl().setBundle("");
|
||||
assertThat(this.properties.getSsl().determineEnabled()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void propertiesUseConsistentDefaultValues() {
|
||||
ConnectionFactory connectionFactory = new ConnectionFactory();
|
||||
|
||||
Reference in New Issue
Block a user