getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException() — spring-boot Function Reference
Architecture documentation for the getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException() function in ConfigDataEnvironmentContributorsTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 330fa13f_96aa_5909_d7d1_70503caa24d1["getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException()"] bbaa3361_4374_8f1b_b1b8_7754bae606f4["createBoundImportContributor()"] 330fa13f_96aa_5909_d7d1_70503caa24d1 -->|calls| bbaa3361_4374_8f1b_b1b8_7754bae606f4 5f0c1c36_012f_880d_d499_3a02c8f8dab2["getBinder()"] 330fa13f_96aa_5909_d7d1_70503caa24d1 -->|calls| 5f0c1c36_012f_880d_d499_3a02c8f8dab2 8297d150_846a_4cc4_47ca_e6d5a70497f3["bind()"] 330fa13f_96aa_5909_d7d1_70503caa24d1 -->|calls| 8297d150_846a_4cc4_47ca_e6d5a70497f3 style 330fa13f_96aa_5909_d7d1_70503caa24d1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentContributorsTests.java lines 380–396
@Test
void getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException() {
MockPropertySource firstPropertySource = new MockPropertySource();
firstPropertySource.setProperty("test", "one");
MockPropertySource secondPropertySource = new MockPropertySource();
secondPropertySource.setProperty("spring.config.activate.on-profile", "production");
secondPropertySource.setProperty("test", "two");
ConfigData configData = new ConfigData(Arrays.asList(firstPropertySource, secondPropertySource));
ConfigDataEnvironmentContributor firstContributor = createBoundImportContributor(configData, 0);
ConfigDataEnvironmentContributor secondContributor = createBoundImportContributor(configData, 1);
ConfigDataEnvironmentContributors contributors = new ConfigDataEnvironmentContributors(this.logFactory,
this.bootstrapContext, Arrays.asList(firstContributor, secondContributor), this.conversionService,
ConfigDataEnvironmentUpdateListener.NONE);
Binder binder = contributors.getBinder(this.activationContext, BinderOption.FAIL_ON_BIND_TO_INACTIVE_SOURCE);
assertThatExceptionOfType(BindException.class).isThrownBy(() -> binder.bind("test", String.class))
.satisfies((ex) -> assertThat(ex.getCause()).isInstanceOf(InactiveConfigDataAccessException.class));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException() do?
getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException() is a function in the spring-boot codebase.
What does getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException() call?
getBinderWhenFailOnBindToInactiveSourceWithLastInactiveThrowsException() calls 3 function(s): bind, createBoundImportContributor, getBinder.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free