Skip to content

Commit

Permalink
Merge pull request #764 from XcrigX/custom-registrations-debugout
Browse files Browse the repository at this point in the history
added debug out to assist troubleshooting custom interceptor/provider…
  • Loading branch information
jamesagnew authored Dec 6, 2024
2 parents 103fd01 + b58264f commit cc6b71d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ private void registerCustomInterceptors(
Object interceptor = null;
try {
interceptor = theAppContext.getBean(clazz);
ourLog.info("registering custom interceptor as bean: {}", className);
} catch (NoSuchBeanDefinitionException ex) {
// no op - if it's not a bean we'll try to create it
}
Expand All @@ -501,6 +502,7 @@ private void registerCustomInterceptors(
if (interceptor == null) {
try {
interceptor = clazz.getConstructor().newInstance();
ourLog.info("registering custom interceptor as pojo: {}", className);
} catch (Exception e) {
throw new ConfigurationException("Unable to instantiate interceptor class : " + className, e);
}
Expand Down Expand Up @@ -532,6 +534,7 @@ private void registerCustomProviders(
Object provider = null;
try {
provider = theAppContext.getBean(clazz);
ourLog.info("registering custom provider as bean: {}", className);
} catch (NoSuchBeanDefinitionException ex) {
// no op - if it's not a bean we'll try to create it
}
Expand All @@ -540,6 +543,7 @@ private void registerCustomProviders(
if (provider == null) {
try {
provider = clazz.getConstructor().newInstance();
ourLog.info("registering custom provider as pojo: {}", className);
} catch (Exception e) {
throw new ConfigurationException("Unable to instantiate provider class : " + className, e);
}
Expand Down

0 comments on commit cc6b71d

Please sign in to comment.