本文整理匯總了Java中org.springframework.boot.devtools.remote.server.DispatcherFilter.doFilter方法的典型用法代碼示例。如果您正苦於以下問題:Java DispatcherFilter.doFilter方法的具體用法?Java DispatcherFilter.doFilter怎麽用?Java DispatcherFilter.doFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.boot.devtools.remote.server.DispatcherFilter
的用法示例。
在下文中一共展示了DispatcherFilter.doFilter方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ignoresUnmappedUrl
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void ignoresUnmappedUrl() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI("/restart");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
filter.doFilter(this.request, this.response, this.chain);
assertRestartInvoked(false);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:10,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例2: ignoresIfMissingSecretFromRequest
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void ignoresIfMissingSecretFromRequest() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI(DEFAULT_CONTEXT_PATH + "/restart");
filter.doFilter(this.request, this.response, this.chain);
assertRestartInvoked(false);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:9,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例3: ignoresInvalidSecretInRequest
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void ignoresInvalidSecretInRequest() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI(DEFAULT_CONTEXT_PATH + "/restart");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "invalid");
filter.doFilter(this.request, this.response, this.chain);
assertRestartInvoked(false);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:10,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例4: invokeRestartWithDefaultSetup
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void invokeRestartWithDefaultSetup() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI(DEFAULT_CONTEXT_PATH + "/restart");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
filter.doFilter(this.request, this.response, this.chain);
assertRestartInvoked(true);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:10,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例5: invokeRestartWithCustomServerContextPath
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void invokeRestartWithCustomServerContextPath() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret",
"server.context-path:/test");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI("/test" + DEFAULT_CONTEXT_PATH + "/restart");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
filter.doFilter(this.request, this.response, this.chain);
assertRestartInvoked(true);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:11,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例6: invokeTunnelWithDefaultSetup
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void invokeTunnelWithDefaultSetup() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI(DEFAULT_CONTEXT_PATH + "/debug");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
filter.doFilter(this.request, this.response, this.chain);
assertTunnelInvoked(true);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:10,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例7: invokeTunnelWithCustomServerContextPath
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void invokeTunnelWithCustomServerContextPath() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret",
"server.context-path:/test");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI("/test" + DEFAULT_CONTEXT_PATH + "/debug");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
filter.doFilter(this.request, this.response, this.chain);
assertTunnelInvoked(true);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:11,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例8: invokeTunnelWithCustomHeaderName
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void invokeTunnelWithCustomHeaderName() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret",
"spring.devtools.remote.secretHeaderName:customheader");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI(DEFAULT_CONTEXT_PATH + "/debug");
this.request.addHeader("customheader", "supersecret");
filter.doFilter(this.request, this.response, this.chain);
assertTunnelInvoked(true);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:11,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例9: devToolsHealthReturns200
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void devToolsHealthReturns200() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI(DEFAULT_CONTEXT_PATH);
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
this.response.setStatus(500);
filter.doFilter(this.request, this.response, this.chain);
assertThat(this.response.getStatus()).isEqualTo(200);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:11,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例10: devToolsHealthWithCustomServerContextPathReturns200
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void devToolsHealthWithCustomServerContextPathReturns200() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret",
"server.context-path:/test");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI("/test" + DEFAULT_CONTEXT_PATH);
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
this.response.setStatus(500);
filter.doFilter(this.request, this.response, this.chain);
assertThat(this.response.getStatus()).isEqualTo(200);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:RemoteDevToolsAutoConfigurationTests.java
示例11: devToolsHealthReturns200
import org.springframework.boot.devtools.remote.server.DispatcherFilter; //導入方法依賴的package包/類
@Test
public void devToolsHealthReturns200() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI(DEFAULT_CONTEXT_PATH);
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
this.response.setStatus(500);
filter.doFilter(this.request, this.response, this.chain);
assertThat(this.response.getStatus(), equalTo(200));
}