{"id":400,"date":"2023-04-24T19:47:33","date_gmt":"2023-04-24T10:47:33","guid":{"rendered":"https:\/\/software.satoshis.jp\/?p=400"},"modified":"2023-04-27T17:25:49","modified_gmt":"2023-04-27T08:25:49","slug":"spring-boot%e3%81%a7%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%ab%e7%92%b0%e5%a2%83%e3%81%a8%e6%9c%ac%e7%95%aa%e7%92%b0%e5%a2%83%e3%81%a7application-properties%e3%82%92%e5%88%87%e3%82%8a%e6%9b%bf%e3%81%88","status":"publish","type":"post","link":"https:\/\/software.satoshis.jp\/?p=400","title":{"rendered":"Spring Boot\u3067\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3068\u672c\u756a\u74b0\u5883\u3067application.properties\u3092\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u958b\u767a\u74b0\u5883\u3068\u672c\u756a\u74b0\u5883\u3067application.properties\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u90e8\u304c\u7570\u306a\u3063\u3066\u3044\u3066\u3001\u6700\u521d\u306f\u3044\u3061\u3044\u3061\u66f8\u304d\u63db\u3048\u3066\u305f\u3051\u3069\u3001\u3081\u3093\u3069\u304f\u3055\u304f\u306a\u3063\u3066application.properties\u30d5\u30a1\u30a4\u30eb\u3092\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5\u304c\u306a\u3044\u304b\u3068\u691c\u7d22\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3050\u3050\u3063\u3066\u307f\u308b\u3068\u3001\u958b\u767a\u74b0\u5883\u7528\u306eapplication-dev.properties\u3068\u672c\u756a\u7528\u306e application-prod.properties\u3092\u7528\u610f\u3057\u3066\u3001<br \/>\napplication.properties\u30d5\u30a1\u30a4\u30eb\u306b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nspring.profiles.active=dev\r\n<\/pre>\n<p>\u307f\u305f\u3044\u306a\u306e\u3092\u66f8\u3044\u3066\u3001\u5207\u308a\u66ff\u3048\u308b\u65b9\u6cd5\u304c\u3042\u3063\u305f\u3051\u3069\u3001\u305d\u3053\u3092\u3044\u3061\u3044\u3061\u66f8\u304d\u63db\u3048\u308b\u306e\u304c\u3081\u3093\u3069\u304f\u3055\u3044\u308f\u3051\u3067\u3002<\/p>\n<p>\u7d50\u8ad6\u3068\u3057\u3066\u306f\u3001\u7528\u610f\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306f\u3075\u305f\u3064\u3002<\/p>\n<ul>\n<li>application.properties &#8211; \u672c\u756a\u74b0\u5883\u7528<\/li>\n<li>application-dev.properties &#8211; \u958b\u767a\u74b0\u5883\u7528<\/li>\n<\/ul>\n<p>\u3067\u3001\u958b\u767a\u74b0\u5883\u3067\u306f\u3001\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3057\u3066\u3084\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ export SPRING_PROFILES_ACTIVE=dev\r\n<\/pre>\n<p>\u3053\u306e\u72b6\u614b\u3067Spring Boot\u3092\u8d77\u52d5\u3057\u3066\u3084\u308b\u3068\u3001\u300cThe following 1 profile is active: &#8220;dev&#8221;\u300d\u3068\u51fa\u307e\u3059\u3002\uff08\u53f3\u7aef\u306b\u51fa\u3066\u308b\u306e\u3067\u6a2a\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n  .   ____          _            __ _ _\r\n \/\\\\ \/ ___&#039;_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\r\n( ( )\\___ | &#039;_ | &#039;_| | &#039;_ \\\/ _` | \\ \\ \\ \\\r\n \\\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\r\n  &#039;  |____| .__|_| |_|_| |_\\__, | \/ \/ \/ \/\r\n =========|_|==============|___\/=\/_\/_\/_\/\r\n :: Spring Boot ::                (v3.0.6)\r\n\r\n2023-04-24T19:27:53.463+09:00  INFO 87016 --- &#x5B;           main] hoge.HogeApplication            : Starting HogeApplication using Java 19.0.2 with PID 87016 \r\n2023-04-24T19:27:53.464+09:00  INFO 87016 --- &#x5B;           main] hoge.HogeApplication            : The following 1 profile is active: &quot;dev&quot; \u2190\u30b3\u30b3\r\n<\/pre>\n<p>\u3064\u307e\u308a\u3001active \u306a\u306e\u306f dev \u3067\u3059\u3088\u3063\u3068\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u6c17\u3092\u3064\u3051\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>application.properties \u30d5\u30a1\u30a4\u30eb\u306f\u3001\u5fc5\u305a\u8aad\u307f\u8fbc\u307e\u308c\u308b\u306e\u3067\u3001\u305d\u3061\u3089\u306e\u8a2d\u5b9a\u306f\u3059\u3079\u3066\u8aad\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u300cactive: &#8220;dev&#8221;\u300d\u306e\u5834\u5408\u306f\u3001application.properties \u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092 application-dev.properties \u3067\u4e0a\u66f8\u304d\u3059\u308b\u3088\u3046\u306a\u52d5\u4f5c\u306b\u306a\u308b\u306e\u3067\u3001\u958b\u767a\u74b0\u5883\u3067\u306f\u95a2\u9023\u7b87\u6240\u3092\u3059\u3079\u3066\u4e0a\u66f8\u304d\u3059\u308b\u8a2d\u5b9a\u3092\u66f8\u3044\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u958b\u767a\u74b0\u5883\u3068\u672c\u756a\u74b0\u5883\u3067application.properties\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u90e8\u304c\u7570\u306a\u3063\u3066\u3044\u3066\u3001\u6700\u521d\u306f\u3044\u3061\u3044\u3061\u66f8\u304d\u63db\u3048\u3066\u305f\u3051\u3069\u3001\u3081\u3093\u3069\u304f\u3055\u304f\u306a\u3063\u3066application.properties\u30d5\u30a1\u30a4\u30eb\u3092\u5207 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":386,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[157,83,158],"class_list":["post-400","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-application-properties","tag-spring-boot","tag-158"],"nelio_content":{"autoShareEndMode":"never","automationSources":{"useCustomSentences":false,"customSentences":[]},"efiAlt":"","efiUrl":"","followers":[1],"highlights":[],"isAutoShareEnabled":true,"networkImageIds":[],"permalinkQueryArgs":[],"series":[],"suggestedReferences":[]},"views":3112,"_links":{"self":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=400"}],"version-history":[{"count":5,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":405,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions\/405"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/media\/386"}],"wp:attachment":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}