本文整理汇总了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));
}