Created
March 9, 2021 11:49
-
-
Save renato04/f7173faaa1828f10efcaf111cfb05295 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.MediaType; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import java.math.BigDecimal; | |
@RestController | |
public class ExampleController { | |
public static final BigDecimal VALUE_BIG_DECIMAL = BigDecimal.valueOf(0.081854595094424); | |
@GetMapping(value = "/test/bigdecimal", produces = MediaType.APPLICATION_JSON) | |
public ResponseEntity getBigDecimal() { | |
return new ResponseEntity(new Dto(VALUE_BIG_DECIMAL), HttpStatus.OK); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment