webcane / readme-app

web application which holds and manages articles to read
0 stars 0 forks source link

manage services using func way #54

Open webcane opened 2 years ago

webcane commented 2 years ago

example

@GetMapping("/{username}")
    public ResponseEntity<?> findOne(@PathVariable String username) {
        return userService
                .findOne(username)
                .map(DetailedUserDto::fromEntity)
                .map(ResponseEntity::ok)
                .orElse(ResponseEntity.notFound().build());
    }