Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
dea1884cc2
|
@ -1,21 +1,14 @@
|
|||
package io.metersphere.config;
|
||||
|
||||
import io.metersphere.interceptor.TestInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new TestInterceptor());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RestTemplate restTemplate() {
|
||||
return new RestTemplate();
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
package io.metersphere.interceptor;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@Component
|
||||
public class TestInterceptor implements HandlerInterceptor {
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
// response.setHeader("Authentication-Status", "invalid");
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit b86032cbbda9a9e6028308aa95a887cff2192f1c
|
||||
Subproject commit 8eff343619df1572e1cded52f173257ef4b518a1
|
|
@ -1 +1 @@
|
|||
Subproject commit 7e4d80cc2b870a8cac6dbb9fe6711ab6041faf6d
|
||||
Subproject commit 06fc0a321a9886419be5c607ddaa6b40efb5179b
|
Loading…
Reference in New Issue