{"id":702,"date":"2023-06-11T10:58:00","date_gmt":"2022-07-07T13:44:58","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/"},"modified":"2025-08-01T01:46:51","modified_gmt":"2025-07-31T16:46:51","slug":"%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/","title":{"rendered":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165"},"content":{"rendered":"<p>\u4eca\u65e5\u306fSpring\u306e\u4f9d\u5b58\u6027\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u307f\u307e\u3059\u3002Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e2d\u5fc3\u7684\u306a\u6982\u5ff5\u306f\u3001\u300c\u4f9d\u5b58\u6027\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u300d\u3068\u300c\u30a2\u30b9\u30da\u30af\u30c8\u6307\u5411\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d\u3067\u3059\u3002\u4ee5\u524d\u306bJava\u306e\u4f9d\u5b58\u6027\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u66f8\u3044\u305f\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3057\u3001Google Guice\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u7528\u3057\u3066\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u81ea\u52d5\u5316\u3059\u308b\u65b9\u6cd5\u3082\u8ff0\u3079\u307e\u3057\u305f\u3002<\/p>\n<h2>Spring\u306e\u4f9d\u5b58\u6027\u6ce8\u5165<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001\u6ce8\u91c8\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u3068XML\u30d5\u30a1\u30a4\u30eb\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306e\u4e21\u65b9\u3092\u4f7f\u7528\u3057\u305fSpring\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u30c6\u30b9\u30c8\u306e\u5bb9\u6613\u3055\u304c\u4f9d\u5b58\u6027\u6ce8\u5165\u306e\u4e3b\u306a\u5229\u70b9\u306e\u4e00\u3064\u3067\u3042\u308b\u305f\u3081\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eJUnit\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u306e\u4f8b\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002\u79c1\u306f\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306a\u69cb\u9020\u3092\u6301\u3064spring-dependency-injection\u30de\u30d9\u30f3\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u305e\u308c\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4e00\u3064\u305a\u3064\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165 &#8211; \u30e1\u30a4\u30d6\u30f3\u306e\u4f9d\u5b58\u95a2\u4fc2<\/h3>\n<p>pom.xml \u30d5\u30a1\u30a4\u30eb\u306b Spring \u3068 JUnit \u306e Maven \u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u6700\u7d42\u7684\u306a pom.xml \u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;project xmlns=\"https:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"https:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\r\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\r\n\t&lt;groupId&gt;com.scdev.spring&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;spring-dependency-injection&lt;\/artifactId&gt;\r\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\r\n\r\n\t&lt;dependencies&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;org.springframework&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;spring-context&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;4.0.0.RELEASE&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;junit&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;junit&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;4.8.1&lt;\/version&gt;\r\n\t\t\t&lt;scope&gt;test&lt;\/scope&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t&lt;\/dependencies&gt;\r\n\r\n&lt;\/project&gt;\r\n<\/code><\/pre>\n<p>\u73fe\u5728\u306eSpring Framework\u306e\u5b89\u5b9a\u7248\u306f4.0.0.RELEASE\u3067\u3042\u308a\u3001JUnit\u306e\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306f4.8.1\u3067\u3059\u3002\u3082\u3057\u4ed6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5909\u66f4\u304c\u5fc5\u8981\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u308f\u305a\u304b\u306b\u3042\u308a\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3068\u3001\u4e0a\u8a18\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u3001\u30c8\u30e9\u30f3\u30b8\u30c6\u30a3\u30d6\u306a\u4f9d\u5b58\u95a2\u4fc2\u306e\u305f\u3081\u306b\u4ed6\u306e\u3044\u304f\u3064\u304b\u306ejar\u30d5\u30a1\u30a4\u30eb\u3082Maven\u306e\u4f9d\u5b58\u95a2\u4fc2\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3053\u3068\u306b\u6c17\u3065\u304f\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>Spring\u306e\u4f9d\u5b58\u6027\u6ce8\u5165 &#8211; \u30b5\u30fc\u30d3\u30b9\u30af\u30e9\u30b9<\/h3>\n<p>\u30e1\u30fc\u30eb\u30e1\u30c3\u30bb\u30fc\u30b8\u3068Twitter\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30e6\u30fc\u30b6\u30fc\u306b\u9001\u4fe1\u3057\u305f\u3044\u3068\u3057\u307e\u3057\u3087\u3046\u3002\u4f9d\u5b58\u6027\u6ce8\u5165\u306e\u305f\u3081\u306b\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u305f\u3081\u306e\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u304c\u5fc5\u8981\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u306e\u305f\u3081\u306e\u5358\u4e00\u306e\u30e1\u30bd\u30c3\u30c9\u5ba3\u8a00\u3092\u6301\u3064MessageService\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.services;\r\n\r\npublic interface MessageService {\r\n\r\n\tboolean sendMessage(String msg, String rec);\r\n}\r\n<\/code><\/pre>\n<p>\u4eca\u5f8c\u3001\u30e1\u30fc\u30eb\u3068\u30c4\u30a4\u30c3\u30bf\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b\u305f\u3081\u306e\u5b9f\u969b\u306e\u5b9f\u88c5\u30af\u30e9\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.services;\r\n\r\npublic class EmailService implements MessageService {\r\n\r\n\tpublic boolean sendMessage(String msg, String rec) {\r\n\t\tSystem.out.println(\"Email Sent to \"+rec+ \" with Message=\"+msg);\r\n\t\treturn true;\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.services;\r\n\r\npublic class TwitterService implements MessageService {\r\n\r\n\tpublic boolean sendMessage(String msg, String rec) {\r\n\t\tSystem.out.println(\"Twitter message Sent to \"+rec+ \" with Message=\"+msg);\r\n\t\treturn true;\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u306e\u6e96\u5099\u304c\u6574\u3063\u305f\u306e\u3067\u3001\u6b21\u306f\u30b5\u30fc\u30d3\u30b9\u3092\u6d88\u8cbb\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30af\u30e9\u30b9\u306b\u79fb\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u6625\u306e\u4f9d\u5b58\u6027\u6ce8\u5165 &#8211; \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30af\u30e9\u30b9<\/h3>\n<p>\u4e0a\u8a18\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u5bfe\u3057\u3066\u3001\u30b3\u30f3\u30b7\u30e5\u30fc\u30de\u30fc\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u79c1\u305f\u3061\u306f2\u3064\u306e\u30b3\u30f3\u30b7\u30e5\u30fc\u30de\u30fc\u30af\u30e9\u30b9\u3092\u6301\u3064\u4e88\u5b9a\u3067\u3059 &#8211; 1\u3064\u306fSpring\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u305f\u81ea\u52d5\u30ef\u30a4\u30e4\u30ea\u30f3\u30b0\u304c\u3042\u308a\u3001\u3082\u30461\u3064\u306f\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306a\u3057\u3067\u3001\u30ef\u30a4\u30e4\u30ea\u30f3\u30b0\u306e\u8a2d\u5b9a\u306fXML\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.consumer;\r\n\r\nimport org.springframework.beans.factory.annotation.Autowired;\r\nimport org.springframework.context.annotation.ComponentScan;\r\nimport org.springframework.stereotype.Component;\r\n\r\nimport com.scdev.spring.di.services.MessageService;\r\n\r\n@Component\r\npublic class MyApplication {\r\n\r\n\t\/\/field-based dependency injection\r\n\t\/\/@Autowired\r\n\tprivate MessageService service;\r\n\t\r\n\/\/\tconstructor-based dependency injection\t\r\n\/\/\t@Autowired\r\n\/\/\tpublic MyApplication(MessageService svc){\r\n\/\/\t\tthis.service=svc;\r\n\/\/\t}\r\n\t\r\n\t@Autowired\r\n\tpublic void setService(MessageService svc){\r\n\t\tthis.service=svc;\r\n\t}\r\n\t\r\n\tpublic boolean processMessage(String msg, String rec){\r\n\t\t\/\/some magic like validation, logging etc\r\n\t\treturn this.service.sendMessage(msg, rec);\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u300cMyApplication\u300d\u30af\u30e9\u30b9\u306b\u3064\u3044\u3066\u306e\u3044\u304f\u3064\u304b\u306e\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8:<\/p>\n<ul class=\"post-ul\">\n<li>@Component annotation is added to the class, so that when Spring framework will scan for the components, this class will be treated as component. @Component annotation can be applied only to the class and it\u2019s retention policy is Runtime. If you are not not familiar with Annotations retention policy, I would suggest you to read java annotations tutorial.<\/li>\n<li>@Autowired annotation is used to let Spring know that autowiring is required. This can be applied to field, constructor and methods. This annotation allows us to implement constructor-based, field-based or method-based dependency injection in our components.<\/li>\n<li>For our example, I am using method-based dependency injection. You can uncomment the constructor method to switch to constructor based dependency injection.<\/li>\n<\/ul>\n<p>\u4eca\u5ea6\u306f\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u308f\u305a\u306b\u4f3c\u305f\u3088\u3046\u306a\u30af\u30e9\u30b9\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u3087\u3046\u3002 (Kondo wa anot\u0113shon o tsukawazu ni nita y\u014dna kurasu o kaite mimashou.)<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.consumer;\r\n\r\nimport com.scdev.spring.di.services.MessageService;\r\n\r\npublic class MyXMLApplication {\r\n\r\n\tprivate MessageService service;\r\n\r\n\t\/\/constructor-based dependency injection\r\n\/\/\tpublic MyXMLApplication(MessageService svc) {\r\n\/\/\t\tthis.service = svc;\r\n\/\/\t}\r\n\t\r\n\t\/\/setter-based dependency injection\r\n\tpublic void setService(MessageService svc){\r\n\t\tthis.service=svc;\r\n\t}\r\n\r\n\tpublic boolean processMessage(String msg, String rec) {\r\n\t\t\/\/ some magic like validation, logging etc\r\n\t\treturn this.service.sendMessage(msg, rec);\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308b\u5358\u7d14\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u3067\u3059\u3002XML\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u3067\u306f\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30d9\u30fc\u30b9\u306eSpring\u4f9d\u5b58\u6027\u6ce8\u5165\u307e\u305f\u306f\u30e1\u30bd\u30c3\u30c9\u30d9\u30fc\u30b9\u306eSpring\u4f9d\u5b58\u6027\u6ce8\u5165\u306e\u3044\u305a\u308c\u304b\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30e1\u30bd\u30c3\u30c9\u30d9\u30fc\u30b9\u306e\u6ce8\u5165\u65b9\u6cd5\u3068\u30bb\u30c3\u30bf\u30fc\u30d9\u30fc\u30b9\u306e\u6ce8\u5165\u65b9\u6cd5\u306f\u540c\u3058\u3067\u3059\u304c\u3001\u547c\u3073\u65b9\u304c\u7570\u306a\u308b\u3060\u3051\u3067\u3059\u306e\u3067\u3001\u4f55\u4eba\u304b\u306f\u305d\u308c\u3092\u30bb\u30c3\u30bf\u30fc\u30d9\u30fc\u30b9\u3068\u547c\u3073\u3001\u4ed6\u306e\u4eba\u306f\u30e1\u30bd\u30c3\u30c9\u30d9\u30fc\u30b9\u3068\u547c\u3073\u307e\u3059\u3002<\/p>\n<h3>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u305fSpring\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u8a2d\u5b9a<\/h3>\n<p>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306b\u306f\u3001\u5b9f\u88c5\u3055\u308c\u305fBean\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30a4\u30f3\u30b8\u30a7\u30af\u30c8\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308bConfigurator\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.configuration;\r\n\r\nimport org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.ComponentScan;\r\nimport org.springframework.context.annotation.Configuration;\r\n\r\nimport com.scdev.spring.di.services.EmailService;\r\nimport com.scdev.spring.di.services.MessageService;\r\n\r\n@Configuration\r\n@ComponentScan(value={\"com.scdev.spring.di.consumer\"})\r\npublic class DIConfiguration {\r\n\r\n\t@Bean\r\n\tpublic MessageService getMessageService(){\r\n\t\treturn new EmailService();\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30af\u30e9\u30b9\u306b\u95a2\u9023\u3059\u308b\u3044\u304f\u3064\u304b\u306e\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>@Configuration annotation is used to let Spring know that it\u2019s a Configuration class.<\/li>\n<li>@ComponentScan annotation is used with @Configuration annotation to specify the packages to look for Component classes.<\/li>\n<li>@Bean annotation is used to let Spring framework know that this method should be used to get the bean implementation to inject in Component classes.<\/li>\n<\/ul>\n<p>\u79c1\u305f\u3061\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u306eSpring\u306eDI\u306e\u4f8b\u3092\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306b\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.test;\r\n\r\nimport org.springframework.context.annotation.AnnotationConfigApplicationContext;\r\n\r\nimport com.scdev.spring.di.configuration.DIConfiguration;\r\nimport com.scdev.spring.di.consumer.MyApplication;\r\n\r\npublic class ClientApplication {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tAnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(DIConfiguration.class);\r\n\t\tMyApplication app = context.getBean(MyApplication.class);\r\n\t\t\r\n\t\tapp.processMessage(\"Hi Pankaj\", \"scdev@abc.com\");\r\n\t\t\r\n\t\t\/\/close the context\r\n\t\tcontext.close();\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>AnnotationConfigApplicationContext\u306f\u3001AbstractApplicationContext\u62bd\u8c61\u30af\u30e9\u30b9\u306e\u5b9f\u88c5\u3067\u3042\u308a\u3001\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u304c\u4f7f\u7528\u3055\u308c\u308b\u5834\u5408\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u30b5\u30fc\u30d3\u30b9\u3092\u30aa\u30fc\u30c8\u30ef\u30a4\u30e4\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002AnnotationConfigApplicationContext\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30af\u30e9\u30b9\u306b\u6ce8\u5165\u3059\u308bBean\u5b9f\u88c5\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u5f15\u6570\u3068\u3057\u3066\u30af\u30e9\u30b9\u3092\u53d6\u308a\u307e\u3059\u3002getBean(Class)\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30aa\u30fc\u30c8\u30ef\u30a4\u30e4\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306e\u69cb\u6210\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u30ea\u30bd\u30fc\u30b9\u3092\u591a\u304f\u6d88\u8cbb\u3059\u308b\u305f\u3081\u3001\u4f7f\u7528\u304c\u7d42\u308f\u3063\u305f\u3089\u30af\u30ed\u30fc\u30ba\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4e0a\u8a18\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>Dec 16, 2013 11:49:20 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh\r\nINFO: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3067ed13: startup date [Mon Dec 16 23:49:20 PST 2013]; root of context hierarchy\r\nEmail Sent to scdev@abc.com with Message=Hi Pankaj\r\nDec 16, 2013 11:49:20 PM org.springframework.context.support.AbstractApplicationContext doClose\r\nINFO: Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@3067ed13: startup date [Mon Dec 16 23:49:20 PST 2013]; root of context hierarchy\r\n<\/code><\/pre>\n<h3>Spring\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u3092XML\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u3067\u884c\u3046\u3002<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3001Spring\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u4f55\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u3002applicationContext.xml\u306e\u30b3\u30fc\u30c9\uff1a<\/p>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;beans xmlns=\"https:\/\/www.springframework.org\/schema\/beans\"\r\n\txmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"\r\nhttps:\/\/www.springframework.org\/schema\/beans https:\/\/www.springframework.org\/schema\/beans\/spring-beans-4.0.xsd\"&gt;\r\n\r\n&lt;!-- \r\n\t&lt;bean id=\"MyXMLApp\" class=\"com.scdev.spring.di.consumer.MyXMLApplication\"&gt;\r\n\t\t&lt;constructor-arg&gt;\r\n\t\t\t&lt;bean class=\"com.scdev.spring.di.services.TwitterService\" \/&gt;\r\n\t\t&lt;\/constructor-arg&gt;\r\n\t&lt;\/bean&gt;\r\n--&gt;\r\n\t&lt;bean id=\"twitter\" class=\"com.scdev.spring.di.services.TwitterService\"&gt;&lt;\/bean&gt;\r\n\t&lt;bean id=\"MyXMLApp\" class=\"com.scdev.spring.di.consumer.MyXMLApplication\"&gt;\r\n\t\t&lt;property name=\"service\" ref=\"twitter\"&gt;&lt;\/property&gt;\r\n\t&lt;\/bean&gt;\r\n&lt;\/beans&gt;\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306eXML\u306b\u306f\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30d9\u30fc\u30b9\u3068\u30bb\u30c3\u30bf\u30fc\u30d9\u30fc\u30b9\u306eSpring\u4f9d\u5b58\u6027\u6ce8\u5165\u306e\u4e21\u65b9\u306e\u8a2d\u5b9a\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002 MyXMLApplication\u306f\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306b\u30bb\u30c3\u30bf\u30fc\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u3001bean\u306e\u8a2d\u5b9a\u306b\u306f\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306eproperty\u8981\u7d20\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30d9\u30fc\u30b9\u306e\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306b\u306f\u3001constructor-arg\u8981\u7d20\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u8a2d\u5b9aXML\u30d5\u30a1\u30a4\u30eb\u306f\u30bd\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u30d3\u30eb\u30c9\u5f8c\u306b\u306f\u30af\u30e9\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308a\u307e\u3059\u3002\u7c21\u5358\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067XML\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u3092\u3069\u306e\u3088\u3046\u306b\u4f7f\u7528\u3059\u308b\u304b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.test;\r\n\r\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\r\n\r\nimport com.scdev.spring.di.consumer.MyXMLApplication;\r\n\r\npublic class ClientXMLApplication {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\r\n\t\t\t\t\"applicationContext.xml\");\r\n\t\tMyXMLApplication app = context.getBean(MyXMLApplication.class);\r\n\r\n\t\tapp.processMessage(\"Hi Pankaj\", \"scdev@abc.com\");\r\n\r\n\t\t\/\/ close the context\r\n\t\tcontext.close();\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>ClassPathXmlApplicationContext\u306f\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u3092\u6307\u5b9a\u3057\u3066ApplicationContext\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u8907\u6570\u306e\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u304c\u3042\u308a\u3001\u8907\u6570\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e\u6b8b\u308a\u306f\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u540c\u3058\u3067\u3059\u304c\u3001\u8a2d\u5b9a\u306e\u9078\u629e\u306b\u57fa\u3065\u3044\u3066ApplicationContext\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u306e\u307f\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u4e0a\u8a18\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>Dec 17, 2013 12:01:23 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh\r\nINFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4eeaabad: startup date [Tue Dec 17 00:01:23 PST 2013]; root of context hierarchy\r\nDec 17, 2013 12:01:23 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions\r\nINFO: Loading XML bean definitions from class path resource [applicationContext.xml]\r\nTwitter message Sent to scdev@abc.com with Message=Hi Pankaj\r\nDec 17, 2013 12:01:23 AM org.springframework.context.support.AbstractApplicationContext doClose\r\nINFO: Closing org.springframework.context.support.ClassPathXmlApplicationContext@4eeaabad: startup date [Tue Dec 17 00:01:23 PST 2013]; root of context hierarchy\r\n<\/code><\/pre>\n<p>\u4e00\u90e8\u306e\u51fa\u529b\u304cSpring Framework\u306b\u3088\u3063\u3066\u66f8\u304b\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002Spring Framework\u306f\u30ed\u30b0\u306e\u76ee\u7684\u3067log4j\u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001\u305d\u308c\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u51fa\u529b\u304c\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0\u4f9d\u5b58\u6027\u6ce8\u5165\u306eJUnit\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9<\/h3>\n<p>\u30b9\u30d7\u30ea\u30f3\u30b0\u306b\u304a\u3051\u308b\u4f9d\u5b58\u6027\u6ce8\u5165\u306e\u4e3b\u306a\u5229\u70b9\u306e1\u3064\u306f\u3001\u5b9f\u969b\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308b\u4ee3\u308f\u308a\u306b\u30e2\u30c3\u30af\u30b5\u30fc\u30d3\u30b9\u30af\u30e9\u30b9\u3092\u7c21\u5358\u306b\u53d6\u5f97\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u4e0a\u8a18\u306e\u5168\u3066\u306e\u5b66\u7fd2\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u306b\u95a2\u3059\u308b\u3059\u3079\u3066\u30921\u3064\u306eJUnit 4\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u306b\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.di.test;\r\n\r\nimport org.junit.Assert;\r\nimport org.junit.After;\r\nimport org.junit.Before;\r\nimport org.junit.Test;\r\nimport org.springframework.context.annotation.AnnotationConfigApplicationContext;\r\nimport org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.ComponentScan;\r\nimport org.springframework.context.annotation.Configuration;\r\n\r\nimport com.scdev.spring.di.consumer.MyApplication;\r\nimport com.scdev.spring.di.services.MessageService;\r\n\r\n@Configuration\r\n@ComponentScan(value=\"com.scdev.spring.di.consumer\")\r\npublic class MyApplicationTest {\r\n\t\r\n\tprivate AnnotationConfigApplicationContext context = null;\r\n\r\n\t@Bean\r\n\tpublic MessageService getMessageService() {\r\n\t\treturn new MessageService(){\r\n\r\n\t\t\tpublic boolean sendMessage(String msg, String rec) {\r\n\t\t\t\tSystem.out.println(\"Mock Service\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t};\r\n\t}\r\n\r\n\t@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tcontext = new AnnotationConfigApplicationContext(MyApplicationTest.class);\r\n\t}\r\n\t\r\n\t@After\r\n\tpublic void tearDown() throws Exception {\r\n\t\tcontext.close();\r\n\t}\r\n\r\n\t@Test\r\n\tpublic void test() {\r\n\t\tMyApplication app = context.getBean(MyApplication.class);\r\n\t\tAssert.assertTrue(app.processMessage(\"Hi Pankaj\", \"scdev@abc.com\"));\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u30e1\u30c3\u30bb\u30fc\u30b8\u30b5\u30fc\u30d3\u30b9\u306e\u30e2\u30c3\u30af\u5b9f\u88c5\u3092\u8fd4\u3059getMessageService()\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308b\u305f\u3081\u3001\u30af\u30e9\u30b9\u306f@Configuration\u3068@ComponentScan\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u6ce8\u91c8\u304c\u4ed8\u3051\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001getMessageService()\u30e1\u30bd\u30c3\u30c9\u306b\u306f@Bean\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u304c\u4ed8\u3051\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u69cb\u6210\u3055\u308c\u305fMyApplication\u30af\u30e9\u30b9\u3092\u30c6\u30b9\u30c8\u3057\u3066\u3044\u308b\u305f\u3081\u3001setUp()\u30e1\u30bd\u30c3\u30c9\u3067AnnotationConfigApplicationContext\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002context\u306ftearDown()\u30e1\u30bd\u30c3\u30c9\u3067\u30af\u30ed\u30fc\u30ba\u3055\u308c\u307e\u3059\u3002test()\u30e1\u30bd\u30c3\u30c9\u306e\u30b3\u30fc\u30c9\u306f\u3001\u5358\u306b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u304b\u3089\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3066\u30c6\u30b9\u30c8\u3057\u3066\u3044\u307e\u3059\u3002Spring Framework\u304c\u3069\u306e\u3088\u3046\u306b\u30aa\u30fc\u30c8\u30ef\u30a4\u30e4\u30ea\u30f3\u30b0\u304a\u3088\u3073Spring Framework\u306b\u77e5\u3089\u308c\u3066\u3044\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3073\u51fa\u3057\u3092\u884c\u3063\u3066\u3044\u308b\u306e\u304b\u6c17\u306b\u306a\u308a\u307e\u3059\u304b\u3002\u305d\u308c\u306f\u3001Java\u306e\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u975e\u5e38\u306b\u591a\u304f\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30af\u30e9\u30b9\u306e\u52d5\u4f5c\u3092\u5b9f\u884c\u6642\u306b\u5206\u6790\u304a\u3088\u3073\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4e0a\u8a18\u306eURL\u304b\u3089\u30b5\u30f3\u30d7\u30eb\u306eSpring Dependency Injection\uff08DI\uff09\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u305d\u308c\u3092\u4f7f\u3063\u3066\u3055\u3089\u306b\u5b66\u3076\u305f\u3081\u306b\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5\u306fSpring\u306e\u4f9d\u5b58\u6027\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u307f\u307e\u3059\u3002Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e2d\u5fc3\u7684\u306a\u6982\u5ff5\u306f\u3001\u300c\u4f9d\u5b58\u6027\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u300d\u3068\u300c\u30a2\u30b9\u30da\u30af\u30c8\u6307\u5411\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d\u3067\u3059\u3002\u4ee5\u524d\u306bJava\u306e\u4f9d\u5b58\u6027\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-702","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\" \/>\n<meta property=\"og:description\" content=\"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-07T13:44:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T16:46:51+00:00\" \/>\n<meta name=\"author\" content=\"\u6d77\u6597, \u8475\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6d77\u6597, \u8475\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"30\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/\",\"name\":\"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-07-07T13:44:58+00:00\",\"dateModified\":\"2025-07-31T16:46:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\"},\"description\":\"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\",\"name\":\"\u6d77\u6597, \u8475\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"caption\":\"\u6d77\u6597, \u8475\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165 - Blog - Silicon Cloud","description":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\/","og_locale":"ja_JP","og_type":"article","og_title":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165","og_description":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-07-07T13:44:58+00:00","article_modified_time":"2025-07-31T16:46:51+00:00","author":"\u6d77\u6597, \u8475","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u6d77\u6597, \u8475","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"30\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/","name":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-07-07T13:44:58+00:00","dateModified":"2025-07-31T16:46:51+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6"},"description":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u4f9d\u5b58\u6027\u6ce8\u5165"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6","name":"\u6d77\u6597, \u8475","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","caption":"\u6d77\u6597, \u8475"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%82%b9%e3%83%97%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%ae%e4%be%9d%e5%ad%98%e6%80%a7%e6%b3%a8%e5%85%a5\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=702"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/702\/revisions"}],"predecessor-version":[{"id":43934,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/702\/revisions\/43934"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}