Keresés

Új hozzászólás Aktív témák

  • Aethelstone

    addikt

    válasz jetarko #6385 üzenetére

    Persze.

    Itt egy darab kontrollermetódus:

    @Override
    @RequestMapping(value=RestConstants.AppInfo.SERVICE_NAME, method = { RequestMethod.GET, RequestMethod.POST })
    protected HttpEntity<byte[]> processRequest(HttpServletRequest request) {
    return super.doIt(RestConstants.AppInfo.SERVICE_NAME, request);
    }

    és a hozzátartozó interfész:

    public interface RestConstants {

    @RestApiFunction(name = "Application info", description = "Provides information about the application", responseClass = RestAppInfoBean.class)
    public interface AppInfo {

    @RestApiRequestParameter(service = true, description = "")
    static final String SERVICE_NAME = "appinfo";

    }

    }

    Ez egy restapi implementáció darabja, pár saját annotációval megspékelve.
    Mondjuk ez egy régebbi megvalósítás, ami még nem Enum-ot használ, azt éppen keresem a projektben :)

    [ Szerkesztve ]

    MI 10T Pro 8/256 , Arsenal FC - Go Gunnarz...

Új hozzászólás Aktív témák