-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
自定义的Resttemplate,无法被SentialResttemplate注解强化 #3329
Labels
Comments
ruansheng8
added a commit
to ruansheng8/spring-cloud-alibaba
that referenced
this issue
Jun 8, 2023
ruansheng8
added a commit
to ruansheng8/spring-cloud-alibaba
that referenced
this issue
Jun 8, 2023
ruansheng8
added
kind/bug
Mark as bug
area/sentinel
spring cloud alibaba sentinel
labels
Jun 8, 2023
I willl fix it |
steverao
pushed a commit
that referenced
this issue
Jun 8, 2023
ruansheng8
added a commit
to ruansheng8/spring-cloud-alibaba
that referenced
this issue
Jun 9, 2023
ruansheng8
added a commit
to ruansheng8/spring-cloud-alibaba
that referenced
this issue
Jun 9, 2023
ruansheng8
added a commit
to ruansheng8/spring-cloud-alibaba
that referenced
this issue
Jun 9, 2023
This was referenced Jun 9, 2023
ruansheng8
added a commit
to ruansheng8/spring-cloud-alibaba
that referenced
this issue
Jun 9, 2023
steverao
pushed a commit
that referenced
this issue
Jun 11, 2023
steverao
pushed a commit
that referenced
this issue
Jun 11, 2023
This was referenced Jan 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。另外请按照如下要求提交相关信息节省社区维护同学的理解成本,否则该讨论极有可能直接被忽视或关闭。
We recommend using English. If you are non-native English speaker, you can use the translation software. We recommend using English. If you are non-native English speaker, you can use the translation software. In addition, please submit relevant information according to the following requirements to save the understanding cost of community maintenances, otherwise the discussion is very likely to be ignored or closed directly.
Which Component
Sentinel
Describe the bug
A clear and concise description of what the bug is.
当我使用自定义的RestTemplate时,com.alibaba.cloud.sentinel.custom.SentinelBeanPostProcessor#postProcessMergedBeanDefinition
判断逻辑错误,无法判断自定义的RestTemplate
if (beanName == null || beanType != RestTemplate.class) {
Simplest demo
The URL of the simplest demo to reproduce the problem.
public class CustomRestTemplate extends RestTemplate {
}
@bean("internalRestTemplate")
@LoadBalanced
@primary
@SentinelRestTemplate(fallbackClass = ExceptionUtil.class, fallback = "handleFallback",
blockHandler = "handleBlock",blockHandlerClass = ExceptionUtil.class)
public RestTemplate internalRestTemplate(
@Autowired @qualifier("restHttpClient") CloseableHttpClient httpClient,
PlatformHttpRequestInterceptor platformHttpRequestInterceptor,
PlatformResponseErrorHandler platformResponseErrorHandler) {
logger.info("SentinelPlatformRestTemplate开始!");
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
e.g. MacOS 、Java8 、 Version 0.2.1.RELEASE
version: 2022.0.0.0-RC2
The text was updated successfully, but these errors were encountered: