<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>b1a9id</author_name>
  <author_url>https://blog.hatena.ne.jp/b1a9id/</author_url>
  <blog_title>BullよりElk</blog_title>
  <blog_url>https://b1a9idps.com/</blog_url>
  <categories>
  </categories>
  <description>ここ数年で何回かぶち当たってたことが解決したので備忘録として。内容はタイトルの通りです。 @SpringBootTest を使ってテスト書けば設定ファイルを読み込んでくれるので悩む必要はないんですけど、大人の事情でそういうことができない場合もありますよね。そうすると当然、設定ファイルを読み込んでくれないわけです。 今回、@SpringBootTest を使ってテストを書かなくても設定ファイルを読み込めるようなテストを書きました。 app.properties app.domain=b1a9idps.com AppProperties.java @ConfigurationProperties(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fb1a9idps.com%2Fposts%2Fconfiguration-properties-test&quot; title=&quot;ユニットテストで@ConfigurationPropertiesが有効になるようにしたい！ - BullよりElk&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-11-07 10:00:00</published>
  <title>ユニットテストで@ConfigurationPropertiesが有効になるようにしたい！</title>
  <type>rich</type>
  <url>https://b1a9idps.com/posts/configuration-properties-test</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
