2

次の方法があります。

    @Cacheable(value = "psgSiteToMap", key = "'P2M_'.concat(#siteName)")
    public Map getSiteDetail(String siteName) {
        Map map = new HashMap();
        .....
        //construct map variable here
        .......
        return map;
    }

プロジェクトの起動中、このメソッドが属するクラスを自動配線できません。上記の方法を次のように変更した場合;

    @Cacheable(value = "psgSiteToMap", key = "'P2M_'.concat(#siteName)")
    private Map getSiteDetail(String siteName) {
        Map map = new HashMap();
        .....
        //construct map variable here
        ................
        return map;
    }

    public Map getSiteDetailPublic(String siteName) {
         return this.getSiteDetail(siteName);
    }

できます。@Cacheablepublic メソッドのアノテーションに制限はありますか?

前もって感謝します

4

1 に答える 1