Fix SentryUserFilter in spring and spring-jakarta samples#4316
Fix SentryUserFilter in spring and spring-jakarta samples#4316
SentryUserFilter in spring and spring-jakarta samples#4316Conversation
Performance metrics 🚀
|
adinauer
left a comment
There was a problem hiding this comment.
While this should work, it sounds like a bug if the bean can't be found. We should investigate that.
I've changed this to use private void registerSentryHubBean(final @NotNull BeanDefinitionRegistry registry) {
final BeanDefinitionBuilder builder =
BeanDefinitionBuilder.genericBeanDefinition(ScopesAdapter.class);
builder.setInitMethodName("getInstance");
registry.registerBeanDefinition("sentryHub", builder.getBeanDefinition());
}So using something like |
|
This actually works fine, my IDE produces an error because it doesn't know that the bean will be there at runtime, obviously. |
📜 Description
Previously this was
This didn't register the bean because "Could not autowire. No beans of 'IScopes' type found. ".
This seems to work, not sure if it's the correct approach.
#skip-changelog