BAEL-4687: updated formatting
This commit is contained in:
parent
65e9e80f0c
commit
d4b22c74e3
@ -1,20 +1,21 @@
|
|||||||
package com.baeldung.boot.jackson.controller;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.baeldung.boot.jackson.model.Coffee;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class CoffeeController {
|
public class CoffeeController {
|
||||||
|
|
||||||
@GetMapping("/coffee")
|
@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)
|
return new Coffee().setBrand(brand)
|
||||||
.setDate(LocalDateTime.now())
|
.setDate(LocalDateTime.now())
|
||||||
.setName(name);
|
.setName(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user