As mentioned in Chapter 3, Quick start, JavaConfig requires only a minimal set of dependencies for basic (non-AOP) configuration scenarios.
Note | |
---|---|
Please note that this release is not published
at the central Maven repository. Instead it is published on Amazon's S3
service, like all Spring milestones. To use it, add the following
repository to your POM:
<repository> <id>spring-milestone</id> <name>Spring Milestone Repository</name> <url>http://s3.amazonaws.com/maven.springframework.org/milestone</url> </repository> |
This minimal configuration will work for all JavaConfig features that do not involve AOP.
<dependencies> <dependency> <groupId>org.springframework.javaconfig</groupId> <artifactId>spring-javaconfig</artifactId> <version>1.0.0.m3</version> </dependency> </dependencies>
In an effort to keep the number of dependencies required when using JavaConfig to a minimum, AOP-related dependencies are excluded by default. Should you wish to use AOP with JavaConfig, modify your Maven2 POM configuration to include the following:
<dependencies> <dependency> <groupId>org.springframework.javaconfig</groupId> <artifactId>spring-javaconfig</artifactId> <version>1.0.0.m3</version> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> <version>2.2.3</version> <optional>true</optional> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm-commons</artifactId> <version>2.2.3</version> <optional>true</optional> </dependency> <dependency> <groupId>aspectj</groupId> <artifactId>aspectjlib</artifactId> <version>1.5.3</version> <optional>true</optional> </dependency> <dependency> <groupId>aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.5.3</version> <optional>true</optional> </dependency> <dependency> <groupId>aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.5.3</version> <optional>true</optional> </dependency> </dependencies>