Add example for implicit conversion in controller methods

This commit is contained in:
Yasin Bhojawala
2017-11-04 18:12:45 +05:30
parent bc899ef38f
commit b32cd7a635
2 changed files with 50 additions and 0 deletions
@@ -0,0 +1,16 @@
package org.baeldung.converter.controller;
import com.baeldung.toggle.Employee;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/string-to-employee")
public class StringToEmployeeConverterController {
@GetMapping
public ResponseEntity<Object> getStringToEmployee(@RequestParam("employee") Employee employee) {
return ResponseEntity.ok(employee);
}
}