<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>arcanum_jp</author_name>
  <author_url>https://blog.hatena.ne.jp/arcanum_jp/</author_url>
  <blog_title>arcanum_jp’s blog</blog_title>
  <blog_url>https://arcanum.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>SpringBootでの例外処理について学んだのでメモ 基本 コントローラー内にて、メソッドに@ExceptionHandlerを指定すると例外が発生するとそのメソッドが呼び出される。下記で実行すると、http://localhost/expで例外が発生しますが、例外が発生するとexception( )が呼び出される。ハンドラ内でリクエストやレスポンス、送出された例外にアクセスしたい場合はメソッド引数に定義すれば使える。便利すぎんぞ！！コントローラーには下のケースでは@RestControllerを指定しているため、ハンドラではAPIの戻りとしてJSONなりを返せばいい。サンプルでは単純に文字…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Farcanum.hatenablog.com%2Fentry%2F2019%2F02%2F07%2F191850&quot; title=&quot;SpringBoot 例外処理についてのメモ - arcanum_jp’s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-02-07 19:18:50</published>
  <title>SpringBoot 例外処理についてのメモ</title>
  <type>rich</type>
  <url>https://arcanum.hatenablog.com/entry/2019/02/07/191850</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
