I am trying to implement Spring Condition org.springframework.context.annotation.Condition
as follows:
public class APIScanningDecisionMaker impl
this works fine for me
public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
try {
InputStream i = conditionContext.getResourceLoader().getResource("prop.file").getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(i));
StringBuilder out = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
out.append(line);
}
System.out.println(out.toString());
} catch (IOException e) {
e.printStackTrace();
}
return true;
}