BAEL-4687: updated formatting

This commit is contained in:
Adina Rolea 2020-12-17 14:02:59 +02:00
parent 65e9e80f0c
commit d4b22c74e3
1 changed files with 7 additions and 6 deletions

View File

@ -1,20 +1,21 @@
package com.baeldung.boot.jackson.controller;
import java.time.LocalDateTime;
import com.baeldung.boot.jackson.model.Coffee;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baeldung.boot.jackson.model.Coffee;
import java.time.LocalDateTime;
@RestController
public class CoffeeController {
@GetMapping("/coffee")
public Coffee getCoffee(@RequestParam(required = false) String brand, @RequestParam(required = false) String name) {
public Coffee getCoffee(
@RequestParam(required = false) String brand,
@RequestParam(required = false) String name) {
return new Coffee().setBrand(brand)
.setDate(LocalDateTime.now())
.setName(name);
.setDate(LocalDateTime.now())
.setName(name);
}
}