All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.huiche.web.api.method.Get Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
package org.huiche.web.api.method;

import org.huiche.data.entity.BaseEntity;
import org.huiche.web.ServiceProvider;
import org.huiche.web.api.Api;
import org.huiche.web.response.BaseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * restful 获取单条数据
 *
 * @author Maning
 */
public interface Get> extends Api, ServiceProvider {
    /**
     * 获取单条数据
     *
     * @param id id
     * @return 数据
     */
    @GetMapping("{id}")
    default BaseResult get(@PathVariable Long id) {
        return ok(service().get(id));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy