Skip to content

Commit

Permalink
Merge branch '1.4.x' into 1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Apr 10, 2017
2 parents 035cbd9 + ac98d2a commit a132bd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,9 +36,11 @@
public @interface ConditionalOnClass {

/**
* The classes that must be present. Since this annotation parsed by loading class
* bytecode it is safe to specify classes here that may ultimately not be on the
* classpath.
* The classes that must be present. Since this annotation is parsed by loading class
* bytecode, it is safe to specify classes here that may ultimately not be on the
* classpath, only if this annotation is directly on the affected component and
* <b>not</b> if this annotation is used as a composed, meta-annotation. In order to
* use this annotation as a meta-annotation, only use the {@link #name} attribute.
* @return the classes that must be present
*/
Class<?>[] value() default {};
Expand Down
7 changes: 7 additions & 0 deletions spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6159,6 +6159,13 @@ actually use the `value` attribute to refer to the real class, even though that
might not actually appear on the running application classpath. You can also use the
`name` attribute if you prefer to specify the class name using a `String` value.

[TIP]
====
If you are using `@ConditionalOnClass` or `@ConditionalOnMissingClass` as apart of a
meta-annotation to compose your own composed annotations you must use `name` as referring
to the class in such a case is not handled.
====



[[boot-features-bean-conditions]]
Expand Down

0 comments on commit a132bd1

Please sign in to comment.