GitHub user Roronoa-Zoro edited a discussion: customized 
ServiceInstanceCustomizer in dubbo 2.7.15 is not invoked

### Pre-check

- [X] I am sure that all the content I provide is in English.


### Apache Dubbo Component

Java SDK (apache/dubbo)

### Details

dubbo 2.7.15
jdk 8
I want to add a parameter/metadata when service is exported, and I have this 
class.
![image](https://github.com/user-attachments/assets/9dfac200-7230-4a9b-8f5d-1b9c5a19bc10)

```java
@Activate(group = CommonConstants.PROVIDER)
public class ParamServiceInstanceCustomizer implements 
ServiceInstanceCustomizer {
    static {
        System.err.println("ParamServiceInstanceCustomizer 
loaded====================");
    }

    @Override
    public void customize(ServiceInstance serviceInstance) {
        serviceInstance.getMetadata().put("dubbo.hello", "value22");
    }
}
```
and I try to put it under 
META-INF/dubbo/org.apache.dubbo.registry.client.ServiceInstanceCustomizer or 
META-INF/dubbo/internal/org.apache.dubbo.registry.client.ServiceInstanceCustomizer
and content is “param=com.example.demo.dubbo.ParamServiceInstanceCustomizer”

but this ParamServiceInstanceCustomizer  is not invoked when server starts up, 
even if the dubbo internal class: ServiceInstanceMetadataCustomizer is also not 
invoked,

can anyone help ? Thanks

### Code of Conduct

- [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)


GitHub link: https://github.com/apache/dubbo/discussions/15533

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to