forked from Cookies_Github_mirror/AquaDX
[+] Metrics (#95)
* Add actuator and micrometer * update * [-] Remove unused import * [O] Make code less verbose * format * refactor --------- Co-authored-by: Azalea <22280294+hykilpikonna@users.noreply.github.com>
This commit is contained in:
@@ -48,4 +48,4 @@ class Mai2Import(
|
||||
) {
|
||||
override fun createEmpty() = Maimai2DataExport()
|
||||
override val userDataRepo = repos.userData
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ class ApiException(val code: Int, message: Str) : RuntimeException(message) {
|
||||
fun resp() = ResponseEntity.status(code).body(message.toString())
|
||||
}
|
||||
|
||||
fun Exception.simpleDescribe(): String = if (this is ApiException) "E${code}" else javaClass.simpleName
|
||||
|
||||
@ControllerAdvice(basePackages = ["icu.samnyan"])
|
||||
class GlobalExceptionHandler {
|
||||
@ExceptionHandler(ApiException::class)
|
||||
|
||||
Reference in New Issue
Block a user