Search in sources :

Example 1 with IRestful

use of cn.cerc.jbean.core.IRestful in project summer-bean by cn-cerc.

the class StartServices method loadServices.

private static void loadServices() {
    if (services != null)
        return;
    services = new HashMap<>();
    for (String serviceCode : Application.getServices().getBeanDefinitionNames()) {
        IService service = Application.getService(null, serviceCode);
        if (service instanceof IRestful) {
            String path = ((IRestful) service).getRestPath();
            if (null != path && !"".equals(path)) {
                services.put(path, serviceCode);
                log.info("restful service " + serviceCode + ": " + path);
            }
        }
    }
}
Also used : IRestful(cn.cerc.jbean.core.IRestful) IService(cn.cerc.jbean.core.IService)

Aggregations

IRestful (cn.cerc.jbean.core.IRestful)1 IService (cn.cerc.jbean.core.IService)1