mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Expose default RabbitMQ credentials in the metadata
See gh-6863
This commit is contained in:
parent
1685a5d8db
commit
878a2e1a49
@ -54,12 +54,12 @@ public class RabbitProperties {
|
||||
/**
|
||||
* Login user to authenticate to the broker.
|
||||
*/
|
||||
private String username;
|
||||
private String username = "guest";
|
||||
|
||||
/**
|
||||
* Login to authenticate against the broker.
|
||||
*/
|
||||
private String password;
|
||||
private String password = "guest";
|
||||
|
||||
/**
|
||||
* SSL configuration.
|
||||
|
@ -134,8 +134,8 @@ public class RabbitPropertiesTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void usernameDefaultsToNull() {
|
||||
assertThat(this.properties.getUsername()).isNull();
|
||||
public void usernameDefaultsToGuest() {
|
||||
assertThat(this.properties.getUsername()).isEqualTo("guest");
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -166,8 +166,8 @@ public class RabbitPropertiesTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void passwordDefaultsToNull() {
|
||||
assertThat(this.properties.getPassword()).isNull();
|
||||
public void passwordDefaultsToGuest() {
|
||||
assertThat(this.properties.getPassword()).isEqualTo("guest");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user