Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to make a rest api in spring

    @GetMapping(value = "/{id}")
    public Foo findById(@PathVariable("id") Long id) {
        return RestPreconditions.checkFound(service.findById(id));
    }
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #rest #api #spring
ADD COMMENT
Topic
Name
3+7 =