@Entity no longer required with spring-aspect

This commits complements 222d2b1 for another required dependency.

javax.persistence.Entity was previously required, regardless of which
aspects were actually used by the project. It is now optional and will
not break the build if it is not present. Note that the side effect is that
AnnotationDrivenStaticEntityMockingControl is disabled as well if the
JPA API is not available.

Issue: SPR-6819
This commit is contained in:
Stephane Nicoll 2014-10-24 10:39:59 +02:00
parent 222d2b1639
commit d9df50c6cd
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,8 @@
package org.springframework.mock.staticmock;
import org.aspectj.lang.annotation.RequiredTypes;
/**
* Annotation-based aspect to use in test builds to enable mocking of static methods
* on JPA-annotated {@code @Entity} classes, as used by Spring Roo for so-called
@ -57,6 +59,7 @@ package org.springframework.mock.staticmock;
* @author Sam Brannen
* @see MockStaticEntityMethods
*/
@RequiredTypes("javax.persistence.Entity")
public aspect AnnotationDrivenStaticEntityMockingControl extends AbstractMethodMockingControl {
/**