mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-09 17:37:27 +08:00
[O] Optimize
This commit is contained in:
@@ -14,6 +14,7 @@ import java.nio.charset.StandardCharsets
|
|||||||
@RestControllerAdvice(basePackages = ["icu.samnyan.aqua.sega.cardmaker"])
|
@RestControllerAdvice(basePackages = ["icu.samnyan.aqua.sega.cardmaker"])
|
||||||
class CardMakerControllerAdvice {
|
class CardMakerControllerAdvice {
|
||||||
val logger = logger()
|
val logger = logger()
|
||||||
|
val mapper = ObjectMapper()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the map object from json string
|
* Get the map object from json string
|
||||||
@@ -25,7 +26,6 @@ class CardMakerControllerAdvice {
|
|||||||
val src = request.inputStream.readAllBytes()
|
val src = request.inputStream.readAllBytes()
|
||||||
val outputString = String(src, StandardCharsets.UTF_8).trim { it <= ' ' }
|
val outputString = String(src, StandardCharsets.UTF_8).trim { it <= ' ' }
|
||||||
logger.info("Request ${request.requestURI}: $outputString")
|
logger.info("Request ${request.requestURI}: $outputString")
|
||||||
val mapper = ObjectMapper()
|
|
||||||
return mapper.readValue(outputString, object : TypeReference<MutableMap<String, Any>>() {})
|
return mapper.readValue(outputString, object : TypeReference<MutableMap<String, Any>>() {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user