{"id":6483,"date":"2026-04-21T14:31:12","date_gmt":"2026-04-21T05:31:12","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=6483"},"modified":"2026-10-21T14:31:20","modified_gmt":"2026-10-21T05:31:20","slug":"springboot-configurationproperties-vs-value","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/6483\/","title":{"rendered":"Spring Boot\u306e@ConfigurationProperties\u3068@Value\u306e\u9055\u3044"},"content":{"rendered":"<p>Spring Boot\u3067\u8a2d\u5b9a\u5024\u3092\u8aad\u307f\u8fbc\u3080\u3068\u304d\u3001\u5358\u4e00\u306e\u5024\u306a\u3089@Value\u3001\u95a2\u9023\u3059\u308b\u8907\u6570\u9805\u76ee\u3092\u307e\u3068\u3081\u3066\u7ba1\u7406\u3059\u308b\u306a\u3089@ConfigurationProperties\u304c\u57fa\u672c\u7684\u306a\u9078\u629e\u80a2\u3067\u3059\u3002@ConfigurationProperties\u306f\u578b\u5b89\u5168\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u307e\u3068\u3081\u3066\u30d0\u30a4\u30f3\u30c9\u3057\u3001\u8a2d\u5b9a\u540d\u306e\u8868\u8a18\u3086\u308c\u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3059\u3002\u4e00\u65b9\u306e@Value\u306f\u500b\u5225\u306e\u5024\u3092\u6ce8\u5165\u3057\u3001SpEL\u5f0f\u3082\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u74b0\u5883\u5225\u306e\u8a2d\u5b9a\u5024\u3092\u6271\u3046\u5834\u5408\u306f\u3001\u6ce8\u5165\u65b9\u6cd5\u3060\u3051\u3067\u306a\u304f\u3001\u8a2d\u5b9a\u5024\u306e\u5b9a\u7fa9\u5834\u6240\u3068\u79d8\u5bc6\u60c5\u5831\u306e\u6271\u3044\u3082\u5206\u3051\u3066\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>@Value\u3068@ConfigurationProperties\u306f\u4f55\u304c\u9055\u3046\uff1f<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u6bd4\u8f03<\/th>\n<th>@Value<\/th>\n<th>@ConfigurationProperties<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u5411\u3044\u3066\u3044\u308b\u898f\u6a21<\/td>\n<td>\u5c11\u6570\u30fb\u500b\u5225\u306e\u5024<\/td>\n<td>\u540c\u3058prefix\u306e\u8907\u6570\u8a2d\u5b9a<\/td>\n<\/tr>\n<tr>\n<td>\u30d0\u30a4\u30f3\u30c9<\/td>\n<td>\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u30fc\u30fbSpEL\u3092\u5229\u7528<\/td>\n<td>\u968e\u5c64\u5316\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u578b\u5b89\u5168\u306a\u30d0\u30a4\u30f3\u30c9<\/td>\n<\/tr>\n<tr>\n<td>Relaxed binding<\/td>\n<td>\u9650\u5b9a\u7684\u3002\u6b63\u898f\u5f62\u306e\u30ad\u30fc\u6307\u5b9a\u3092\u63a8\u5968<\/td>\n<td>\u5bfe\u5fdc<\/td>\n<\/tr>\n<tr>\n<td>SpEL<\/td>\n<td>\u5229\u7528\u3067\u304d\u308b<\/td>\n<td>\u76f4\u63a5\u306f\u5bfe\u8c61\u5916<\/td>\n<\/tr>\n<tr>\n<td>\u8a2d\u5b9a\u30e1\u30bf\u30c7\u30fc\u30bf<\/td>\n<td>\u76f4\u63a5\u306e\u30b5\u30dd\u30fc\u30c8\u306a\u3057<\/td>\n<td>\u30e1\u30bf\u30c7\u30fc\u30bf\u751f\u6210\u306b\u5bfe\u5fdc<\/td>\n<\/tr>\n<tr>\n<td>\u69cb\u9020\u3068\u30ec\u30d3\u30e5\u30fc<\/td>\n<td>\u8a2d\u5b9a\u6570\u304c\u5897\u3048\u308b\u3068\u6ce8\u5165\u5148\u304c\u5206\u6563\u3057\u3084\u3059\u3044<\/td>\n<td>\u5b9a\u7fa9\u30af\u30e9\u30b9\u3078\u307e\u3068\u3081\u3084\u3059\u3044<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Spring Boot\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3082\u3001\u72ec\u81ea\u306e\u8a2d\u5b9a\u30b0\u30eb\u30fc\u30d7\u3092\u4f5c\u308b\u5834\u5408\u306f@ConfigurationProperties\u3092\u4f7f\u3063\u3066\u69cb\u9020\u5316\u3059\u308b\u65b9\u6cd5\u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002\u9055\u3044\u306f\u5358\u7d14\u306a\u901f\u5ea6\u6bd4\u8f03\u3067\u306f\u306a\u304f\u3001\u7ba1\u7406\u3059\u308b\u8a2d\u5b9a\u306e\u7a2e\u985e\u3068\u8cac\u52d9\u3067\u3059\u3002<\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aRelaxed binding<\/strong><br \/>app.mail.host\u3001\u74b0\u5883\u5909\u6570APP_MAIL_HOST\u306a\u3069\u3001\u8a18\u6cd5\u306e\u7570\u306a\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3092\u540c\u3058\u8a2d\u5b9a\u9805\u76ee\u3078\u5bfe\u5fdc\u3065\u3051\u308b\u4ed5\u7d44\u307f\u3002@Value\u306b\u3082\u9650\u5b9a\u7684\u306a\u5bfe\u5fdc\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<hr>\n<h2>@Value\u3067\u4e00\u3064\u306e\u8a2d\u5b9a\u5024\u3092\u8aad\u307f\u8fbc\u3080<\/h2>\n<p>\u5358\u4e00\u306e\u8a2d\u5b9a\u9805\u76ee\u306a\u3089@Value\u304c\u7c21\u6f54\u3067\u3059\u3002application.yml\u306b\u5024\u3092\u5b9a\u7fa9\u3057\u3001Spring\u7ba1\u7406Bean\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3084\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5f15\u6570\u304b\u3089\u53c2\u7167\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code># application.yml\r\napp:\r\n  mail:\r\n    host: smtp.example.invalid\r\n    port: 2525<\/code><\/pre>\n<pre><code>import org.springframework.beans.factory.annotation.Value;\r\nimport org.springframework.stereotype.Component;\r\n\r\n@Component\r\npublic class MailHostPrinter {\r\n    private final String host;\r\n\r\n    public MailHostPrinter(@Value(&quot;${app.mail.host}&quot;) String host) {\r\n        this.host = host;\r\n    }\r\n\r\n    public String host() {\r\n        return host;\r\n    }\r\n}<\/code><\/pre>\n<p>\u3053\u3053\u3067\u306esmtp.example.invalid\u306f\u8aac\u660e\u7528\u306e\u30c9\u30e1\u30a4\u30f3\u3067\u3059\u3002\u5b9f\u63a5\u7d9a\u306f\u60f3\u5b9a\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u306a\u304a\u3001\u5b58\u5728\u3057\u306a\u3044\u30ad\u30fc\u3092\u6307\u5b9a\u3059\u308b\u3068\u8a2d\u5b9a\u89e3\u6c7a\u306b\u5931\u6557\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u65e2\u5b9a\u5024\u3092\u8a31\u5bb9\u3059\u308b\u8a2d\u8a08\u306a\u3089\u3001\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u30fc\u5185\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<hr>\n<h2>\u8907\u6570\u9805\u76ee\u3092@ConfigurationProperties\u3067\u307e\u3068\u3081\u308b<\/h2>\n<p>\u30e1\u30fc\u30eb\u63a5\u7d9a\u5148\u306a\u3069\u95a2\u9023\u3059\u308b\u8a2d\u5b9a\u304c\u5897\u3048\u308b\u5834\u5408\u306f\u30011\u3064\u306e\u578b\u306b\u307e\u3068\u3081\u308b\u3068\u5024\u306e\u6240\u5728\u304c\u660e\u78ba\u306b\u306a\u308a\u307e\u3059\u3002Spring Boot 3\u4ee5\u964d\u3067\u306frecord\u306b\u3088\u308b\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>import org.springframework.boot.context.properties.ConfigurationProperties;\r\n\r\n@ConfigurationProperties(prefix = &quot;app.mail&quot;)\r\npublic record MailSettings(String host, int port) {\r\n}<\/code><\/pre>\n<pre><code>import org.springframework.boot.SpringApplication;\r\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\r\nimport org.springframework.boot.context.properties.ConfigurationPropertiesScan;\r\n\r\n@SpringBootApplication\r\n@ConfigurationPropertiesScan\r\npublic class DemoApplication {\r\n    public static void main(String[] args) {\r\n        SpringApplication.run(DemoApplication.class, args);\r\n    }\r\n}<\/code><\/pre>\n<pre><code>import org.springframework.stereotype.Service;\r\n\r\n@Service\r\npublic class MailService {\r\n    private final MailSettings settings;\r\n\r\n    public MailService(MailSettings settings) {\r\n        this.settings = settings;\r\n    }\r\n\r\n    public String host() {\r\n        return settings.host();\r\n    }\r\n}<\/code><\/pre>\n<p>@ConfigurationPropertiesScan\u3067\u5b9a\u7fa9\u30af\u30e9\u30b9\u3092\u691c\u51fa\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306fDemoApplication\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u914d\u4e0b\u306bMailSettings\u304c\u3042\u308b\u524d\u63d0\u3067\u3059\u3002record\u306f\u5fc5\u8981\u306a\u5024\u3092\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u53d7\u3051\u53d6\u308b\u305f\u3081\u3001\u4f7f\u3046\u5074\u306f\u307e\u3068\u307e\u3063\u305f\u578b\u3092\u6ce8\u5165\u3067\u304d\u307e\u3059\u3002\u8a2d\u5b9a\u5bfe\u8c61\u30af\u30e9\u30b9\u3092\u901a\u5e38\u306e@Component\u3084@Bean\u3067\u751f\u6210\u3059\u308b\u3068\u3001\u540c\u3058\u5f62\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u306b\u306a\u3089\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u70b9\u306b\u3082\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<hr>\n<h2>\u74b0\u5883\u5909\u6570\u3068application.yml\u306e\u7ba1\u7406<\/h2>\n<p>\u672c\u756a\u30fb\u958b\u767a\u74b0\u5883\u3067\u5024\u3092\u5207\u308a\u66ff\u3048\u308b\u3068\u304d\u306f\u3001\u8a2d\u5b9a\u306e\u30bd\u30fc\u30b9\u3068\u30d0\u30a4\u30f3\u30c9\u65b9\u6cd5\u3092\u5206\u3051\u3066\u8003\u3048\u307e\u3059\u3002\u4f8b\u3048\u3070app.mail.host\u3092\u74b0\u5883\u5909\u6570APP_MAIL_HOST\u3067\u4e0a\u66f8\u304d\u3059\u308b\u69cb\u6210\u3092\u691c\u8a0e\u3067\u304d\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u8a2d\u5b9a\u30bd\u30fc\u30b9\u4f8b<\/th>\n<th>\u76ee\u7684<\/th>\n<th>\u6ce8\u610f\u70b9<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>application.yml<\/td>\n<td>\u5171\u901a\u306e\u65e2\u5b9a\u5024\u3084\u958b\u767a\u7528\u8a2d\u5b9a<\/td>\n<td>\u6a5f\u5bc6\u60c5\u5831\u3092Git\u3078\u30b3\u30df\u30c3\u30c8\u3057\u306a\u3044<\/td>\n<\/tr>\n<tr>\n<td>application-prod.yml<\/td>\n<td>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u5225\u306e\u5024<\/td>\n<td>\u3069\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u6709\u52b9\u304b\u78ba\u8a8d\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u74b0\u5883\u5909\u6570<\/td>\n<td>\u5b9f\u884c\u74b0\u5883\u3067\u306e\u5dee\u3057\u66ff\u3048<\/td>\n<td>\u547d\u540d\u898f\u5247\u30fb\u30c7\u30d7\u30ed\u30a4\u8a2d\u5b9a\u3092\u691c\u8a3c\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>Secret Manager\u7b49<\/td>\n<td>\u8a8d\u8a3c\u60c5\u5831\u306a\u3069\u306e\u4fdd\u8b77<\/td>\n<td>\u6a29\u9650\u3068\u904b\u7528\u65b9\u91dd\u3092\u5225\u9014\u6574\u5099\u3059\u308b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>@ConfigurationProperties\u3092\u4f7f\u3063\u305f\u3060\u3051\u3067\u8a8d\u8a3c\u60c5\u5831\u304c\u5b89\u5168\u306b\u306a\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30d1\u30b9\u30ef\u30fc\u30c9\u30fb\u30c8\u30fc\u30af\u30f3\u7b49\u306f\u5e73\u6587\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3078\u5b89\u6613\u306b\u4fdd\u5b58\u305b\u305a\u3001\u904b\u7528\u74b0\u5883\u306e\u79d8\u5bc6\u60c5\u5831\u7ba1\u7406\u3092\u5229\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>@Value\u306e\u4f7f\u3044\u3059\u304e\u3067\u8d77\u3053\u308a\u3084\u3059\u3044\u554f\u984c<\/h2>\n<p>\u8a2d\u5b9a\u304c\u591a\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u8907\u6570\u306e@Service\u3084@Component\u3078@Value\u3092\u6563\u3089\u3059\u3068\u3001\u3069\u306e\u753b\u9762\u3084\u6a5f\u80fd\u304c\u4f55\u306e\u30ad\u30fc\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u304b\u8ffd\u3044\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002\u500b\u5225\u306e\u6ce8\u5165\u304c\u60aa\u3044\u306e\u3067\u306f\u306a\u304f\u3001\u540c\u3058\u30b0\u30eb\u30fc\u30d7\u306e\u8a2d\u5b9a\u304c\u8907\u6570\u306e\u5834\u6240\u3078\u5206\u6563\u3059\u308b\u306e\u304c\u554f\u984c\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u4e00\u3064\u306e\u30af\u30e9\u30b9\u306b\u95a2\u9023\u3059\u308b\u30ad\u30fc\u304c\u591a\u3044\u306a\u3089@ConfigurationProperties\u3067\u96c6\u7d04\u3059\u308b\u3002<\/li>\n<li>\u8a2d\u5b9a\u540d\u3092\u5909\u66f4\u3059\u308b\u3068\u304d\u306f\u53c2\u7167\u7b87\u6240\u3092\u628a\u63e1\u3059\u308b\u3002<\/li>\n<li>\u578b\u5909\u63db\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u305f\u3089\u3001\u5024\u3068\u5bfe\u8c61\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u578b\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/li>\n<li>\u5fc5\u9808\u9805\u76ee\u306b\u306f\u9069\u5207\u306a\u691c\u8a3c\u3092\u5c0e\u5165\u3057\u3001\u8a2d\u5b9a\u4e0d\u8db3\u3092\u8d77\u52d5\u6642\u306b\u691c\u77e5\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>@Validated\u3084Jakarta Bean Validation\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u3084Boot\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3066\u5229\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>@ConfigurationProperties\u304c\u6ce8\u5165\u3055\u308c\u306a\u3044\u3068\u304d\u306e\u78ba\u8a8d<\/h2>\n<ul>\n<li>@ConfigurationPropertiesScan\u304b@EnableConfigurationProperties\u3067\u578b\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304b\u3002<\/li>\n<li>\u30b9\u30ad\u30e3\u30f3\u5bfe\u8c61\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u914d\u4e0b\u306b\u3042\u308b\u304b\u3002<\/li>\n<li>prefix\u3068application.yml\u306e\u968e\u5c64\u304c\u4e00\u81f4\u3057\u3066\u3044\u308b\u304b\u3002<\/li>\n<li>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3092\u4f7f\u3046\u578b\u304c\u901a\u5e38\u306e@Component\u751f\u6210Bean\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u304b\u3002<\/li>\n<li>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u5225\u8a2d\u5b9a\u306e\u8aad\u307f\u8fbc\u307f\u9806\u3084\u74b0\u5883\u5909\u6570\u304c\u60f3\u5b9a\u3068\u5408\u3063\u3066\u3044\u308b\u304b\u3002<\/li>\n<li>\u79d8\u5bc6\u60c5\u5831\u3092\u30ed\u30b0\u3067\u5168\u6587\u8868\u793a\u3057\u3066\u3044\u306a\u3044\u304b\u3002<\/li>\n<\/ul>\n<p>\u300c\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u306a\u3044\u300d\u3068\u3044\u3046\u75c7\u72b6\u3067\u3082\u3001\u539f\u56e0\u306f\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u9078\u629e\u3001Bean\u767b\u9332\u3001\u8a2d\u5b9a\u30bd\u30fc\u30b9\u306e\u512a\u5148\u9806\u4f4d\u306a\u3069\u306b\u5206\u304b\u308c\u307e\u3059\u3002\u5024\u3092\u516c\u958b\u30ed\u30b0\u3078\u51fa\u3059\u306e\u3067\u306f\u306a\u304f\u3001\u8a2d\u5b9a\u30ad\u30fc\u30fb\u767b\u9332\u72b6\u614b\u30fb\u30a2\u30d7\u30ea\u8d77\u52d5\u6642\u306e\u30a8\u30e9\u30fc\u304b\u3089\u5207\u308a\u5206\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u9078\u5b9a\u306e\u305f\u3081\u306e\u5224\u65ad\u8868<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u72b6\u6cc1<\/th>\n<th>\u5224\u65ad<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u30e1\u30fc\u30eb\u306ehost\u306a\u3069\u4e00\u3064\u306e\u5024\u3092\u8aad\u307f\u305f\u3044<\/td>\n<td>@Value\u3082\u5019\u88dc<\/td>\n<\/tr>\n<tr>\n<td>\u95a2\u9023\u3059\u308b\u8907\u6570\u306e\u8a2d\u5b9a\u3092\u578b\u5b89\u5168\u306b\u4fdd\u6301\u3057\u305f\u3044<\/td>\n<td>@ConfigurationProperties\u3092\u512a\u5148<\/td>\n<\/tr>\n<tr>\n<td>SpEL\u3067\u52d5\u7684\u306a\u5f0f\u3092\u4f7f\u3044\u305f\u3044<\/td>\n<td>@Value\u304c\u5411\u3044\u3066\u3044\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u74b0\u5883\u5225\u306e\u4e00\u9023\u306e\u8a2d\u5b9a\u3092\u5171\u6709\u3057\u305f\u3044<\/td>\n<td>@ConfigurationProperties\u3067\u307e\u3068\u3081\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u8a2d\u5b9a\u304c1\u500b\u3057\u304b\u306a\u304f\u69cb\u9020\u5316\u306e\u52b9\u679c\u304c\u8584\u3044<\/td>\n<td>\u7121\u7406\u306b\u8a2d\u5b9a\u30af\u30e9\u30b9\u3092\u5897\u3084\u3055\u306a\u3044<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u65b0\u3057\u304f\u8a2d\u8a08\u3059\u308b\u3068\u304d\u306f\u3001\u8a2d\u5b9a\u306e\u6570\u3060\u3051\u3067\u306a\u304f\u3001\u540c\u3058\u6982\u5ff5\u306b\u5c5e\u3059\u308b\u304b\u3001\u578b\u306e\u6574\u5408\u6027\u3084\u74b0\u5883\u5dee\u5206\u3092\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3092\u57fa\u6e96\u306b\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u95a2\u9023\u3059\u308bSpring Boot\u306e\u8a18\u4e8b<\/h2>\n<p>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u5168\u4f53\u306e\u5f79\u5272\u3092\u6574\u7406\u3057\u305f\u3044\u3068\u304d\u306f\u65e2\u5b58\u8a18\u4e8b\u3001\u8a2d\u5b9a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092Spring\u7ba1\u7406Bean\u3078\u6e21\u3059\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3057\u305f\u3044\u3068\u304d\u306fDI\u306e\u89e3\u8aac\u304c\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p>\uff08Spring\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u5f79\u5272\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1104\/\">Spring Boot\u306e\u3088\u304f\u4f7f\u308f\u308c\u308b\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3068\u306f\uff1f\u521d\u5fc3\u8005\u5fc5\u898b\u306e\u89e3\u8aac\u3068\u6d3b\u7528\u6cd5<\/a>\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<p>\uff08\u8a2d\u5b9a\u30af\u30e9\u30b9\u3092Bean\u3078\u6ce8\u5165\u3059\u308b\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1327\/\">Spring Boot \u306e@Autowired \u306f\u306a\u305c\u52d5\u304f\uff1fNullPointerException \u5bfe\u7b56\u304b\u3089\u5b66\u3076 DI\/IoC \u306e\u57fa\u672c\u3068\u300c\u6b63\u3057\u3044\u300d\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u7ba1\u7406\u8853<\/a>\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<h2>\u3088\u304f\u3042\u308b\u7591\u554f\u3068\u307e\u3068\u3081<\/h2>\n<h3>@Value\u306f\u53e4\u3044\u306e\u3067\u4f7f\u308f\u306a\u3044\u65b9\u304c\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n<p>\u3044\u3044\u3048\u3002\u5c11\u6570\u306e\u500b\u5225\u8a2d\u5b9a\u3084SpEL\u304c\u5fc5\u8981\u306a\u5834\u9762\u3067\u306f\u6709\u52b9\u3067\u3059\u3002\u8907\u6570\u306e\u95a2\u9023\u8a2d\u5b9a\u3092\u307e\u3068\u3081\u308b\u306a\u3089@ConfigurationProperties\u304c\u5411\u304d\u307e\u3059\u3002<\/p>\n<h3>@ConfigurationProperties\u306b@Component\u3092\u4ed8\u3051\u308c\u3070\u5341\u5206\u3067\u3059\u304b\uff1f<\/h3>\n<p>JavaBean\u65b9\u5f0f\u306a\u3089\u69cb\u6210\u306b\u3088\u3063\u3066\u4f7f\u3048\u307e\u3059\u304c\u3001record\u306a\u3069\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001@ConfigurationPropertiesScan\u3084@EnableConfigurationProperties\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<h3>@Value\u306bRelaxed binding\u306f\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<\/h3>\n<p>\u9650\u5b9a\u7684\u306b\u3042\u308a\u307e\u3059\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u30fc\u306e\u30ad\u30fc\u3092\u5c0f\u6587\u5b57kebab-case\u306a\u3069\u306e\u6b63\u898f\u5f62\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>@Value\u3068@ConfigurationProperties\u306f\u4e8c\u8005\u629e\u4e00\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5358\u767a\u306e\u8a2d\u5b9a\u5024\u306f\u7c21\u6f54\u306b\u3001\u95a2\u9023\u8a2d\u5b9a\u7fa4\u306f\u578b\u3068\u3057\u3066\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u5b9f\u52d9\u3067\u306e\u5224\u65ad\u57fa\u6e96\u3067\u3059\u3002\u74b0\u5883\u3054\u3068\u306e\u4e0a\u66f8\u304d\u3084\u79d8\u533f\u60c5\u5831\u306e\u6271\u3044\u306f\u5225\u306e\u8a2d\u8a08\u3068\u3057\u3066\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u73fe\u5728\u306e@Value\u6307\u5b9a\u3092\u70b9\u691c\u3057\u3001\u540c\u3058prefix\u3067\u7e70\u308a\u8fd4\u3057\u4f7f\u3046\u8a2d\u5b9a\u304c\u3042\u308c\u3070\u69cb\u9020\u5316\u3067\u304d\u308b\u304b\u8003\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"featured_media":6491,"template":"","meta":{"ssp_meta_title":"Spring Boot @ConfigurationProperties\u3068@Value\u306e\u9055\u3044\u30fb\u4f7f\u3044\u5206\u3051","ssp_meta_description":"Spring Boot\u306e@ConfigurationProperties\u3068@Value\u3092\u6bd4\u8f03\u3002\u578b\u5b89\u5168\u306a\u8a2d\u5b9a\u7ba1\u7406\u3001Relaxed binding\u3001record\u306b\u3088\u308b\u30d0\u30a4\u30f3\u30c9\u3001\u74b0\u5883\u5909\u6570\u3068\u6ce8\u5165\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002","ssp_meta_keyword":"Spring Boot ConfigurationProperties Value \u9055\u3044,@ConfigurationProperties \u4f7f\u3044\u65b9,Spring Boot @Value,Relaxed binding \u8a2d\u5b9a,Spring Boot record \u8a2d\u5b9a","ssp_meta_canonical":""},"route_category":[9],"_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/6483"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/6491"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=6483"}],"wp:term":[{"taxonomy":"route_category","embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route_category?post=6483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}