Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What if the precision is lost when @ GetMapping @ PathVariable transfers data of type double?

Shulou Source: shulou.com Published: 2022-06-02 02:19:29 11月17日 Update

This article shows you how to lose precision when passing double type data in @ GetMapping @ PathVariable. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can gain something through the detailed introduction of this article.

The previous way of writing:

@ GetMapping ("/ xxx/ {money}") public ResponseBean test (@ PathVariable Double money) {.}

Change to:

@ GetMapping ("/ xxx/ {money:.+}") public ResponseBean test (@ PathVariable Double money) {.} the above is @ GetMapping @ PathVariable.What about the loss of precision when passing double data? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: What to do data type precision content skills knowledge concise concise writing that is articles more articles industry information information channels channels bright reserve Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Microsoft Apple Xiaomi MariaDB