Skip to content

Commit

Permalink
Do not fail when bean scope is not active. (#21)
Browse files Browse the repository at this point in the history
Fixes #19
  • Loading branch information
maciejwalkowiak authored Jan 14, 2024
1 parent 11d1952 commit b3eb931
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.support.ScopeNotActiveException;
import org.springframework.boot.context.metrics.buffering.StartupTimeline;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
Expand Down Expand Up @@ -45,6 +46,8 @@ Map<String, String> resolveTags(StartupTimeline.TimelineEvent timelineEvent) {
}
} catch (NoSuchBeanDefinitionException e) {
LOGGER.debug("No bean with name {} found", tags.get("beanName"), e);
} catch (ScopeNotActiveException e) {
LOGGER.debug("Scope is not active when fetching tags from bean: {}", tags.get("beanName"), e);
}

}
Expand Down

0 comments on commit b3eb931

Please sign in to comment.