Home / Function/ startupWithSpecifiedValues() — spring-boot Function Reference

startupWithSpecifiedValues() — spring-boot Function Reference

Architecture documentation for the startupWithSpecifiedValues() function in AbstractFilterRegistrationBeanTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  1330660c_13fd_fb1e_1e65_82439639cf15["startupWithSpecifiedValues()"]
  274e5347_5230_b28a_6bd9_063f10a825b2["createFilterRegistrationBean()"]
  1330660c_13fd_fb1e_1e65_82439639cf15 -->|calls| 274e5347_5230_b28a_6bd9_063f10a825b2
  fc62fa08_0385_996d_87dc_433bff281329["mockServletRegistration()"]
  1330660c_13fd_fb1e_1e65_82439639cf15 -->|calls| fc62fa08_0385_996d_87dc_433bff281329
  a1573ec8_91b5_23a5_b60d_cb665d83f310["getExpectedFilter()"]
  1330660c_13fd_fb1e_1e65_82439639cf15 -->|calls| a1573ec8_91b5_23a5_b60d_cb665d83f310
  style 1330660c_13fd_fb1e_1e65_82439639cf15 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/web/servlet/AbstractFilterRegistrationBeanTests.java lines 81–107

	@Test
	void startupWithSpecifiedValues() throws Exception {
		given(this.servletContext.addFilter(anyString(), any(Filter.class))).willReturn(this.registration);
		AbstractFilterRegistrationBean<?> bean = createFilterRegistrationBean();
		bean.setName("test");
		bean.setAsyncSupported(false);
		bean.setInitParameters(Collections.singletonMap("a", "b"));
		bean.addInitParameter("c", "d");
		bean.setUrlPatterns(new LinkedHashSet<>(Arrays.asList("/a", "/b")));
		bean.addUrlPatterns("/c");
		bean.setServletNames(new LinkedHashSet<>(Arrays.asList("s1", "s2")));
		bean.addServletNames("s3");
		bean.setServletRegistrationBeans(Collections.singleton(mockServletRegistration("s4")));
		bean.addServletRegistrationBeans(mockServletRegistration("s5"));
		bean.setMatchAfter(true);
		bean.onStartup(this.servletContext);
		then(this.servletContext).should().addFilter(eq("test"), getExpectedFilter());
		then(this.registration).should().setAsyncSupported(false);
		Map<String, String> expectedInitParameters = new HashMap<>();
		expectedInitParameters.put("a", "b");
		expectedInitParameters.put("c", "d");
		then(this.registration).should().setInitParameters(expectedInitParameters);
		then(this.registration).should()
			.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, "/a", "/b", "/c");
		then(this.registration).should()
			.addMappingForServletNames(EnumSet.of(DispatcherType.REQUEST), true, "s4", "s5", "s1", "s2", "s3");
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does startupWithSpecifiedValues() do?
startupWithSpecifiedValues() is a function in the spring-boot codebase.
What does startupWithSpecifiedValues() call?
startupWithSpecifiedValues() calls 3 function(s): createFilterRegistrationBean, getExpectedFilter, mockServletRegistration.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free