I have a properties file in `src/main/resources`.

Spring 4.0 and Java 1.8 project.

mock.properties

```
key=test

```

WEB-INF/web.xml

```
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/mvc-dispatcher-servlet.xml</param-value>
</context-param>

```

WEB-INF/mvc-dispatcher-servlet.xml

```
<context:component-scan base-package="com.x.y.z.*">
</context:component-scan>
<context:annotation-config />
<context:spring-configured />
<context:property-placeholder location="classpath:mock.properties"
    order="-1" ignore-resource-not-found="true" ignore-unresolvable="true" />
<mvc:annotation-driven />

```

Controller.java ... I can access the value of property key in controller.

```
@Controller
@RequestMapping("/xyz")
public class EC2Controller {
@Value("${key}")
String v;
}

```

Helper.java ... Can't access any property.Always gets "null"

```
@Component
public class Helper {
@Value("${key}")
String v;
}

```

I also tried various options suggested on forums and spring docs but helper is just not able to read the prop.I tried following as well

```
@Configuration
@PropertySource("classpath:mock.properties")
public class Helper {
@Value("${key}")
String v;

@Bean
public static PropertySourcesPlaceholderConfigurer      
propertySourcesPlaceholderConfigurer() {
   return new PropertySourcesPlaceholderConfigurer();
}
}

```

and 

```
@Configuration
@PropertySource("classpath:mock.properties")
public class Helper {
@Autowired
Environment env;
String v = env.getProperty("key");
}

```

nothing works.