Leaves

Leaves

This website is a Microblog that allows you to post in Markdown.
Sign in with your Google account and use it.

Spring Boot 4 にしたら 400 Bad Request が出るようになった

複数コンストラクタを持つ request dto で パラメータを持つコンストラクタを呼び出し、エラーになっていた。
@JsonCreator でデシリアライズするコンストラクタを明示する。
Lombok の @NoArgsConstructor を使っていた場合は、 @NoArgsConstructor(onConstructor_ = @JsonCreator) と明示する。

ログが表示されないので何が起きているか気づけない。
ResponseEntityExceptionHandler を継承したクラスを作り handleHttpMessageNotReadable メソッドを Override すればロギングを追加できる。

@Override
protected ResponseEntity<Object> handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers,
                                                              HttpStatusCode status, WebRequest request) {
    log.warn("うおおおおお", ex);
    return super.handleHttpMessageNotReadable(ex, headers, status, request);
}

chatbot

  • chatbot backend
    • AI Gateway, LLM
    • Tool
      • APIs
      • DB
      • ベクトルDB(RAG, ナレッジ)

Leaves CLI alias

alias s='docker run -it --rm oven/bun bunx @chibat/leaves'

あえて WSL1 をインストールする

wsl --install Ubuntu --name wsl1
wsl --set-version wsl1 1
CommentEdit1 Like

wslc

notepad $PROFILE   # ファイルがなければ先に New-Item -Force $PROFILE
Set-Alias docker wslc