(I'm assuming you're using Cucumber-JVM)
Instead of using SpringJUnit4ClassRunner, you should use the Cucumber runner instead.
@RunWith(Cucumber.class)
To use this you will need the following dependencies:
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>${info.cukes.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${info.cukes.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-spring</artifactId>
<version>${info.cukes.version}</version>
<scope>test</scope>
</dependency>
This will look for cucumber.xml in your class path. This XML is simply a spring bean configuration XML. Mine is pretty straight forward and contains:
<context:component-scan base-package="cucumber.runtime.java.spring"/>
<context:annotation-config/>
<!-- wire beans required for testing -->
<import resource="classpath*:/context.xml"/>
When you run your tests you should see Spring load cucumber.xml and then import context.xml.