* add spring boot interceptor to copy header(dubbo-tag)/cookie(dubbo.tag) * copy dubbo.tag in urlParameter * copy dubbo.tag in urlParameter * remove dubbo.tag in interceptor * add dubbo-spring-boot-interceptor to dubbo-dependencies-all/.artifacts/dubbo-bom --------- Co-authored-by: liutingfeng <tingfeng.liu@successchannel.com> Co-authored-by: songxiaosheng <songxiaosheng@elastic.link> Co-authored-by: Albumen Kevin <jhq0812@gmail.com> |
||
|---|---|---|
| .. | ||
| src/main/java/org/apache/dubbo/spring/boot/interceptor | ||
| README.md | ||
| pom.xml | ||
README.md
Dubbo Spring Boot interceptor
dubbo-spring-boot-interceptor copy the header(dubbo-tag)/cookie(dubbo.tag)/urlParameter(dubbo.tag) to dubbo .
Integrate with spring boot
copy the header(dubbo-tag=tagx)/urlParameter(dubbo.tag=tagx) to dubbo
if there is no header(dubbo-tag) , downgrade use urlParameter(dubbo.tag)
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new DubboTagHeaderOrParameterInterceptor()).addPathPatterns("/*").excludePathPatterns("/admin");
}
}
copy the cookie(dubbo.tag=tagx) to dubbo
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new DubboTagCookieInterceptor()).addPathPatterns("/*").excludePathPatterns("/admin");
}
}