Wartość atrybutu adnotacji RequestMapping.value musi być stałym wyrażeniem

Używając następującego fragmentu kodu:

public class MyUrls {

    // properties get initialized using static{...}
    public final static String URL_HOMEPAGE = properties.getProperty("app.homepage");    

}

@Controller
public class HomepageController {

    @RequestMapping(MyUrls.URL_HOMEPAGE)
    public String homepage() {
        return "/homepage/index";
    }

}

Otrzymuję następujący błąd:

The value for annotation attribute RequestMapping.value must be a constant expression

Ale właściwie,URL_HOMEPAGE jest stałą, ponieważ jest zadeklarowana jakopublic final static. Czy się mylę? Jak rozwiązać ten problem?

questionAnswers(2)

yourAnswerToTheQuestion