Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

动态绑定DynamicFeature未生效 #96

Open
rayzeng opened this issue Oct 16, 2018 · 3 comments
Open

动态绑定DynamicFeature未生效 #96

rayzeng opened this issue Oct 16, 2018 · 3 comments

Comments

@rayzeng
Copy link

rayzeng commented Oct 16, 2018

Your question

在DynamicFeature接口实现类加上@Provider注解 ,但启动时未调用DynamicFeature接口的configure方法。
@Provider
@ConstrainedTo(RuntimeType.SERVER)
public class ApiMetricsFeature implements DynamicFeature

在DynamicFeature实现类初始化之后, 实现InitializingBean接口,在afterPropertiesSet调用JAXRSProviderManager.registerCustomProviderInstance(this)也未触发调用configure

单步跟DynamicFeature实现类初始化在registerProvider之后才调用到,系统已经初始化完Provider,此时再registerCustomProviderInstance实际并没有效果,求解

Environment

  • Starter version:2.5.0
  • JVM version (e.g. java -version):1.8
@leizhiyuan
Copy link
Contributor

http://www.sofastack.tech/sofa-rpc/docs/RESTful-Filter

SOFARPC vs rest 的设计,需要用户自行注册这个 Provider

@khotyn
Copy link
Member

khotyn commented Dec 3, 2018

@leizhiyuan 我们能够提供一种自动注册的能力吗?

@leizhiyuan
Copy link
Contributor

这个在5.5.0 中跟那个跨域的会一起看

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants