Skip to content
New issue

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

MOSIP-35176 Enabled info log #1575

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void setEmbeddedValueResolver(StringValueResolver resolver) {

@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
logger.debug("inside setApplicationContext");
logger.info("inside setApplicationContext");
mappings = new HashMap<>();
for (String beanName : applicationContext.getBeanDefinitionNames()) {
//Skip processing this intentVerificationConfig bean.
Expand All @@ -52,25 +52,25 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
if (!((ConfigurableApplicationContext) applicationContext).getBeanFactory().getBeanDefinition(beanName)
.isLazyInit()) {
Object obj = applicationContext.getBean(beanName);
logger.debug("bean-"+ beanName);
logger.info("bean-"+ beanName);
Class<?> objClazz = obj.getClass();
logger.debug("objClazz"+ objClazz);
logger.info("objClazz"+ objClazz);
if (AopUtils.isAopProxy(obj)) {

objClazz = AopUtils.getTargetClass(obj);
}

for (Method method : objClazz.getDeclaredMethods()) {
logger.debug("method name-"+method);
logger.info("method name-"+method);
if (method.isAnnotationPresent(PreAuthenticateContentAndVerifyIntent.class)) {
PreAuthenticateContentAndVerifyIntent preAuthenticateContent = method
.getAnnotation(PreAuthenticateContentAndVerifyIntent.class);

String topic = preAuthenticateContent.topic();
logger.debug("topic- "+topic);
logger.info("topic- "+topic);

String callback = preAuthenticateContent.callback();
logger.debug("callback- "+callback);
logger.info("callback- "+callback);
if (topic.startsWith("${") && topic.endsWith("}")) {
topic = resolver.resolveStringValue(topic);
}
Expand All @@ -79,13 +79,14 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
callback = resolver.resolveStringValue(callback);
}
mappings.put(callback, topic);
logger.debug("mapping"+ mappings);
logger.info("mapping"+ mappings);
}
}
IntentVerificationFilter intentVerificationFilter = applicationContext
.getBean(IntentVerificationFilter.class);
intentVerificationFilter.setMappings(mappings);
logger.info("mapping after setting value-"+mappings);
}
}
}
}
}
Loading