Reading value from Spring Property file

Here is my code I'm trying to read " TestMe variable from file.

public class TestToCheckProperties {

    private int testMe;

      public void setTestMe(int testMe) {
    this.testMe = testMe;

    public static void main(String args[]){
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:/META-INF/spring/bean/dfp-web-beans.xml");
        TestToCheckProperties testToCheckProperties=context.getBean(TestToCheckProperties);
        System.out.println("testMe: "+testToCheckProperties.testMe);

This is in my Spring.XML I've created a bean for class TestToCheckProperties:

<bean id='TestToCheckProperties' class="com.My.Code.TestToCheckProperties"  >
        <property name="testMe" value="${My.code.TestToCheckProperties}" />

This is in my My.Property file and I'm trying to read this value in my class:


Here is the error I'm getting


The statement:

TestToCheckProperties testToCheckProperties = 

is invalid. It should rather be:

TestToCheckProperties testToCheckProperties = 
    (TestToCheckProperties) context.getBean("TestToCheckProperties");

Need Your Help

Knockout.js and nulls

jquery rest null knockout.js knockout-mapping-plugin

I'm using a combination of Knockout.js + the Knockout mapping plugin + jQuery in a rich web client that consumes JSON from a RESTful API.

How do you post data to joined tables - Using EF 5, ASP.NET MVC 4 entity-framework join entity-framework-5

I am new to MVC 4 and up to this point I have been retrieving data from one table and saving back to the same table. Now I have data from joined tables and need to save back to the same joined tabl...