コード例 #1
0
 @Override
 public ConditionOutcome getMatchOutcome(
     ConditionContext context, AnnotatedTypeMetadata metadata) {
   if (anyMatches(context, metadata, this.nonEmbedded)) {
     return ConditionOutcome.noMatch("existing non-embedded database detected");
   }
   EmbeddedDatabaseType type =
       EmbeddedDatabaseConnection.get(context.getClassLoader()).getType();
   if (type == null) {
     return ConditionOutcome.noMatch("no embedded database detected");
   }
   return ConditionOutcome.match("embedded database " + type + " detected");
 }
コード例 #2
0
 @Override
 public void afterPropertiesSet() throws Exception {
   this.embeddedDatabaseConnection = EmbeddedDatabaseConnection.get(this.classLoader);
 }