We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Due to Java type erasure, currently I have to manually determine the type of the event's config when listening to this event:
@Component class EurekaInstanceConfigPostProcessor( private val eureka: EurekaRegistration, ) : ApplicationListener<InstanceRegisteredEvent<*>> { override fun onApplicationEvent(event: InstanceRegisteredEvent<*>) { if (event.config is EurekaInstanceConfigBean){ eureka.applicationInfoManager.registerAppMetadata(......) } } }
If InstanceRegisteredEvent can implement ResolvableTypeProvider, i can directly listening and set it's config type:
@Component class EurekaInstanceConfigPostProcessor( private val eureka: EurekaRegistration, ) : ApplicationListener<InstanceRegisteredEvent<EurekaInstanceConfigBean>> { override fun onApplicationEvent(event: InstanceRegisteredEvent<EurekaInstanceConfigBean>) { eureka.applicationInfoManager.registerAppMetadata(......) } }
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/ResolvableTypeProvider.html
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Due to Java type erasure, currently I have to manually determine the type of the event's config when listening to this event:
If InstanceRegisteredEvent can implement ResolvableTypeProvider, i can directly listening and set it's config type:
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/ResolvableTypeProvider.html
The text was updated successfully, but these errors were encountered: