The content of the project should be configured with Spring by importing the Spring configuration file from Hamcrest support project.
The Hamcrest support project contains a Spring configuration file which can be imported into a Spring configuration file which wishes to use the classes from Hamcrest support project.
To import the beans, add an import tag which imports the file com.alpha.pineapple.hamcrest-config.xml:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <!-- import pineapple hamcrest bean definitions. --> <import resource="com.alpha.pineapple.api-config.xml"/> <!-- all remaining bean definitions. --> </beans>
Currently the com.alpha.pineapple.Hamcrest-config.xml contains the definition of these beans: