apache / apache/servicecomb-java-chassis

[BUG] - CSE服务发布无法与Feign兼容

Open
#4,754 5 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
1.9k
Forks
814
Avg merge
8d 23h
Merged PRs (30d)
1

Description

### Steps to Reproduce

如果使用@FeignClient,`org.springframework.cloud.openfeign.FeignContext`也会发送一个`ContextRefreshedEvent`事件,但是这个时候spring应用程序还没有启动成功,也不是所需要的事件,
`org.apache.servicecomb.core.SCBApplicationListener#onApplicationEvent`需要判断context的parent为null才是spring所发送的事件

![Image](https://github.com/user-attachments/assets/56973e6b-f3b1-46f1-aadc-80953a4f4819)

### Servicecomb Version

ALL

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at org.apache.servicecomb.core.SCBApplicationListener#onApplicationEvent and trace how ContextRefreshedEvent is handled when @FeignClient creates a FeignContext. Verify the parent-context behavior described in the issue, then reproduce the CSE publication scenario to confirm that only the intended Spring event triggers publication.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.