{"id":807,"date":"2022-08-15T05:30:33","date_gmt":"2023-11-14T22:18:53","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/spring-mvc-%e3%81%ae%e4%be%8b\/"},"modified":"2025-08-01T02:37:56","modified_gmt":"2025-07-31T17:37:56","slug":"spring-mvc-%e3%81%ae%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/","title":{"rendered":"Spring MVC \u306e\u4f8b"},"content":{"rendered":"<p>\u300cSpring MVC\u306e\u4f8b\u3078\u3088\u3046\u3053\u305d\u3002\u4ee5\u524d\u306bSpring MVC\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u3001Spring Tool Suite\u3092\u4f7f\u7528\u3057\u3066Spring MVC\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u4eca\u65e5\u306fmaven\u3068Eclipse\u3092\u4f7f\u3063\u3066\u57fa\u672c\u7684\u306a\u30cf\u30ed\u30fc\u30ef\u30fc\u30eb\u30c9Spring MVC\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u300d<\/p>\n<h2>Spring MVC \u306e\u4f8b\u984c<\/h2>\n<p>Spring MVC\u306fModel-View-Controller\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc\u306b\u57fa\u3065\u3044\u3066\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u753b\u50cf\u306f\u3001Spring MVC\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc\u3092\u9ad8\u3044\u30ec\u30d9\u30eb\u3067\u793a\u3057\u3066\u3044\u307e\u3059\u3002DispatcherServlet\u306f\u30d5\u30ed\u30f3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u3067\u3042\u308a\u3001\u3059\u3079\u3066\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u53d6\u308a\u51e6\u7406\u3092\u958b\u59cb\u3057\u307e\u3059\u3002web.xml\u30d5\u30a1\u30a4\u30eb\u3067\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u5f79\u5272\u306f\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9069\u5207\u306a\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u306b\u6e21\u3057\u3001\u30d3\u30e5\u30fc\u30da\u30fc\u30b8\u304c\u30ec\u30b9\u30dd\u30f3\u30b9\u30da\u30fc\u30b8\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u305f\u5f8c\u306b\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u3059\u3002HomeController.java\u306f\u3001Spring MVC\u306e\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308b\u5358\u4e00\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u3067\u3059\u3002home.jsp\u3001user.jsp\u306f\u3001Spring MVC\u306e\u30cf\u30ed\u30fc\u30ef\u30fc\u30eb\u30c9\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308b\u30d3\u30e5\u30fc\u30da\u30fc\u30b8\u3067\u3059\u3002User.java\u306f\u3001Spring MVC\u306e\u30b5\u30f3\u30d7\u30ebWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308b\u552f\u4e00\u306e\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u3067\u3059\u3002<\/p>\n<h3>Spring MVC\u306e\u4f8b\u3000\u3053\u3093\u306b\u3061\u306f\u3001\u4e16\u754c\u3000Eclipse\u30d7\u30ed\u30b8\u30a7\u30af\u30c8<\/h3>\n<p>\u4ee5\u4e0b\u306e\u753b\u50cf\u306f\u3001\u79c1\u305f\u3061\u306eSpring MVC\u306eEclipse\u3067\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u3055\u3042\u3001\u6700\u521d\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u300cSpring MVC\u306e\u4f8b\u300d\u300cEclipse\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u300d<\/h3>\n<p>\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3042\u308a\u3001\u4f9d\u5b58\u95a2\u4fc2\u306e\u7ba1\u7406\u306b\u306fMaven\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u3001\u307e\u305a\u3001\u52d5\u7684\u306a\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3092Maven\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u753b\u50cf\u306f\u3001\u3053\u306e\u4f5c\u696d\u3092\u884c\u3044\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u9aa8\u7d44\u307f\u3092\u6e96\u5099\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u300c\u65b0\u898f\u2192\u52d5\u7684Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u300d\u3068\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\u6b21\u306e\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u30da\u30fc\u30b8\u3067\u300cspring-mvc-example\u300d\u3068\u3044\u3046\u540d\u524d\u3092\u6307\u5b9a\u3057\u3001\u305d\u306e\u4ed6\u306e\u9805\u76ee\u306f\u5909\u66f4\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6b21\u306e\u30da\u30fc\u30b8\u3067\u3001\u30bd\u30fc\u30b9\u30d5\u30a9\u30eb\u30c0\u3092\u300csrc\/main\/java\u300d\u3068\u6307\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u8ffd\u52a0\u3059\u308b\u524d\u306b\u3001\u30ea\u30b9\u30c8\u304b\u3089\u300csrc\u300d\u30d5\u30a9\u30eb\u30c0\u3092\u524a\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u6b21\u306f\u3001\u30a6\u30a7\u30d6\u30e2\u30b8\u30e5\u30fc\u30eb\u30da\u30fc\u30b8\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30eb\u30fc\u30c8\u3092\u300cspring-mvc-example\u300d\u3068\u6307\u5b9a\u3057\u3001\u300cweb.xml\u30c7\u30d7\u30ed\u30a4\u8a18\u8ff0\u5b50\u3092\u751f\u6210\u3059\u308b\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5b8c\u4e86\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001Eclipse\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u306b\u65b0\u3057\u3044\u52d5\u7684Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>\u52d5\u7684\u306a\u30a6\u30a7\u30d6\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30e1\u30a4\u30d6\u30f3\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b<\/h3>\n<p>\u79c1\u305f\u3061\u306f\u3001Spring MVC\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u7c21\u5358\u306b\u7ba1\u7406\u3059\u308b\u305f\u3081\u306bMaven\u3092\u4f7f\u7528\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u3067\u3059\u306e\u3067\u3001\u30a6\u30a7\u30d6\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092Maven\u306b\u5909\u63db\u3057\u307e\u3057\u3087\u3046\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u300cConfigure -&gt; Convert to Maven Project\u300d\u3068\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6b21\u306b\u3001\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306bpom.xml\u306e\u8a2d\u5b9a\u3092\u63d0\u4f9b\u3057\u3066\u304f\u3060\u3055\u3044\u3002Maven\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b9\u30b1\u30eb\u30c8\u30f3\u30b3\u30fc\u30c9\u304c\u6e96\u5099\u3067\u304d\u307e\u3057\u305f\u3002\u3053\u308c\u3067\u3001\u5909\u66f4\u3092\u52a0\u3048\u3066Spring MVC\u306e\u30cf\u30ed\u30fc\u30ef\u30fc\u30eb\u30c9\u306e\u4f8b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>pom.xml\u306bSpring MVC\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n<p>pom.xml\u306b\u306f\u3001spring-web\u304a\u3088\u3073spring-webmvc\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001servlet-api\u3001jsp-api\u3001\u304a\u3088\u3073jstl\u306e\u4f9d\u5b58\u95a2\u4fc2\u3082\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u7d42\u7684\u306apom.xml\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\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.mvc&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;spring-mvc-example&lt;\/artifactId&gt;\r\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\r\n\t&lt;packaging&gt;war&lt;\/packaging&gt;\r\n\t&lt;name&gt;Spring MVC Example&lt;\/name&gt;\r\n\t&lt;description&gt;Spring MVC Hello World Example&lt;\/description&gt;\r\n\r\n\t&lt;!-- Add Spring Web and MVC dependencies --&gt;\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-webmvc&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;4.3.9.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;org.springframework&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;spring-web&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;4.3.9.RELEASE&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t\t&lt;!-- Servlet --&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;javax.servlet&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;servlet-api&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;2.5&lt;\/version&gt;\r\n\t\t\t&lt;scope&gt;provided&lt;\/scope&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;javax.servlet.jsp&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;jsp-api&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;2.1&lt;\/version&gt;\r\n\t\t\t&lt;scope&gt;provided&lt;\/scope&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;javax.servlet&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;jstl&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;1.2&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t&lt;\/dependencies&gt;\r\n\r\n\t&lt;build&gt;\r\n\t\t&lt;plugins&gt;\r\n\t\t\t&lt;plugin&gt;\r\n\t\t\t\t&lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;version&gt;3.6.1&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;source&gt;1.8&lt;\/source&gt;\r\n\t\t\t\t\t&lt;target&gt;1.8&lt;\/target&gt;\r\n\t\t\t\t&lt;\/configuration&gt;\r\n\t\t\t&lt;\/plugin&gt;\r\n\t\t\t&lt;plugin&gt;\r\n\t\t\t\t&lt;artifactId&gt;maven-war-plugin&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;version&gt;3.0.0&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;warSourceDirectory&gt;WebContent&lt;\/warSourceDirectory&gt;\r\n\t\t\t\t&lt;\/configuration&gt;\r\n\t\t\t&lt;\/plugin&gt;\r\n\t\t&lt;\/plugins&gt;\r\n\t\t&lt;finalName&gt;${project.artifactId}&lt;\/finalName&gt; &lt;!-- added to remove Version from WAR file --&gt;\r\n\t&lt;\/build&gt;\r\n&lt;\/project&gt;\r\n<\/code><\/pre>\n<p>\u30d3\u30eb\u30c9\u306efinalName\u8a2d\u5b9a\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a\u3001WAR\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u8a73\u7d30\u304c\u542b\u307e\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002Eclipse\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3068\u3001\u5168\u3066\u306ejar\u30d5\u30a1\u30a4\u30eb\u304cMaven\u306e\u4f9d\u5b58\u95a2\u4fc2\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u306b\u6c17\u4ed8\u304f\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0MVC\u306eDispatcherServlet\u306f\u30d5\u30ed\u30f3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002<\/h3>\n<p>\u79c1\u305f\u3061\u306f\u3001\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306bSpring MVC\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u8ffd\u52a0\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306bweb.xml\u3067DispatcherServlet\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;web-app xmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns=\"https:\/\/java.sun.com\/xml\/ns\/javaee\" xsi:schemaLocation=\"https:\/\/java.sun.com\/xml\/ns\/javaee https:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_3_0.xsd\" id=\"WebApp_ID\" version=\"3.0\"&gt;\r\n  &lt;display-name&gt;spring-mvc-example&lt;\/display-name&gt;\r\n\r\n\t&lt;!-- Add Spring MVC DispatcherServlet as front controller --&gt;\r\n\t&lt;servlet&gt;\r\n        &lt;servlet-name&gt;spring&lt;\/servlet-name&gt;\r\n        &lt;servlet-class&gt;\r\n                org.springframework.web.servlet.DispatcherServlet\r\n        &lt;\/servlet-class&gt;\r\n        &lt;init-param&gt;\r\n       \t\t&lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;\r\n       \t\t&lt;param-value&gt;\/WEB-INF\/spring-servlet.xml&lt;\/param-value&gt;\r\n    \t\t&lt;\/init-param&gt;\r\n        &lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;\r\n    &lt;\/servlet&gt;\r\n \r\n    &lt;servlet-mapping&gt;\r\n        &lt;servlet-name&gt;spring&lt;\/servlet-name&gt;\r\n        &lt;url-pattern&gt;\/&lt;\/url-pattern&gt; \r\n    &lt;\/servlet-mapping&gt;\r\n    \r\n &lt;\/web-app&gt;\r\n<\/code><\/pre>\n<p>contextConfigLocation\uff08init-param\uff09\u306f\u3001Spring\u30d3\u30fc\u30f3\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>\u6625\u306eMVC\u306e\u4f8b\u3001Bean\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/h3>\n<p>\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u3001\u4ee5\u4e0b\u306b\u793a\u3059\u3088\u3046\u306bspring-servlet.xml\u3068\u3044\u3046Spring\u30d3\u30fc\u30f3\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;beans:beans xmlns=\"https:\/\/www.springframework.org\/schema\/mvc\"\r\n\txmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:beans=\"https:\/\/www.springframework.org\/schema\/beans\"\r\n\txmlns:context=\"https:\/\/www.springframework.org\/schema\/context\"\r\n\txsi:schemaLocation=\"https:\/\/www.springframework.org\/schema\/mvc https:\/\/www.springframework.org\/schema\/mvc\/spring-mvc.xsd\r\n\t\thttps:\/\/www.springframework.org\/schema\/beans https:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\r\n\t\thttps:\/\/www.springframework.org\/schema\/context https:\/\/www.springframework.org\/schema\/context\/spring-context.xsd\"&gt;\r\n\r\n\t&lt;!-- DispatcherServlet Context: defines this servlet's request-processing \r\n\t\tinfrastructure --&gt;\r\n\r\n\t&lt;!-- Enables the Spring MVC @Controller programming model --&gt;\r\n\t&lt;annotation-driven \/&gt;\r\n\t&lt;context:component-scan base-package=\"com.scdev.spring\" \/&gt;\r\n\r\n\t&lt;!-- Resolves views selected for rendering by @Controllers to .jsp resources \r\n\t\tin the \/WEB-INF\/views directory --&gt;\r\n\t&lt;beans:bean\r\n\t\tclass=\"org.springframework.web.servlet.view.InternalResourceViewResolver\"&gt;\r\n\t\t&lt;beans:property name=\"prefix\" value=\"\/WEB-INF\/views\/\" \/&gt;\r\n\t\t&lt;beans:property name=\"suffix\" value=\".jsp\" \/&gt;\r\n\t&lt;\/beans:bean&gt;\r\n\r\n&lt;\/beans:beans&gt;\r\n<\/code><\/pre>\n<p>\u91cd\u8981\u306a\u69cb\u6210\u306f3\u3064\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u99c6\u52d5\u306b\u3088\u3063\u3066\u3001DispatcherServlet\u306f@Controller\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066Controller\u30af\u30e9\u30b9\u3092\u691c\u7d22\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>context:component-scan\u306b\u3088\u3063\u3066\u3001DispatcherServlet\u306fController\u30af\u30e9\u30b9\u3092\u691c\u7d22\u3059\u308b\u5834\u6240\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>InternalResourceViewResolver\u306eBean\u69cb\u6210\u306b\u3088\u3063\u3066\u3001\u30d3\u30e5\u30fc\u30da\u30fc\u30b8\u306e\u5834\u6240\u3068\u4f7f\u7528\u3059\u308b\u63a5\u5c3e\u8f9e\u304c\u6307\u5b9a\u3055\u308c\u307e\u3059\u3002Controller\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u30d3\u30e5\u30fc\u30da\u30fc\u30b8\u306e\u540d\u524d\u3092\u8fd4\u3057\u3001\u63a5\u5c3e\u8f9e\u304c\u8ffd\u52a0\u3055\u308c\u3066\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306b\u4f7f\u7528\u3059\u308b\u30d3\u30e5\u30fc\u30da\u30fc\u30b8\u304c\u6c7a\u5b9a\u3055\u308c\u307e\u3059\u3002<\/ol>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0MVC\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9<\/h3>\n<p>\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306e\u305f\u3081\u306e &#8220;\/&#8221; \u3068\u3001\u30e6\u30fc\u30b6\u30fc\u30da\u30fc\u30b8\u306e\u305f\u3081\u306e &#8220;\/user&#8221; \u306e2\u3064\u306eURI\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306e\u5358\u4e00\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.controller;\r\n\r\nimport java.text.DateFormat;\r\nimport java.util.Date;\r\nimport java.util.Locale;\r\n\r\nimport org.springframework.stereotype.Controller;\r\nimport org.springframework.ui.Model;\r\nimport org.springframework.validation.annotation.Validated;\r\nimport org.springframework.web.bind.annotation.RequestMapping;\r\nimport org.springframework.web.bind.annotation.RequestMethod;\r\n\r\nimport com.scdev.spring.model.User;\r\n\r\n@Controller\r\npublic class HomeController {\r\n\r\n\t\/**\r\n\t * Simply selects the home view to render by returning its name.\r\n\t *\/\r\n\t@RequestMapping(value = \"\/\", method = RequestMethod.GET)\r\n\tpublic String home(Locale locale, Model model) {\r\n\t\tSystem.out.println(\"Home Page Requested, locale = \" + locale);\r\n\t\tDate date = new Date();\r\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\r\n\r\n\t\tString formattedDate = dateFormat.format(date);\r\n\r\n\t\tmodel.addAttribute(\"serverTime\", formattedDate);\r\n\r\n\t\treturn \"home\";\r\n\t}\r\n\r\n\t@RequestMapping(value = \"\/user\", method = RequestMethod.POST)\r\n\tpublic String user(@Validated User user, Model model) {\r\n\t\tSystem.out.println(\"User Page Requested\");\r\n\t\tmodel.addAttribute(\"userName\", user.getUserName());\r\n\t\treturn \"user\";\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u7c21\u5358\u306e\u305f\u3081\u3001log4j\u306a\u3069\u306e\u30ed\u30b0\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0 MVC\u306e\u30e2\u30c7\u30eb\u30af\u30e9\u30b9<\/h3>\n<p>\u30b7\u30f3\u30d7\u30eb\u306a\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u5358\u4e00\u306e\u5909\u6570\u3068\u305d\u306e\u30b2\u30c3\u30bf\u30fc\u30fb\u30bb\u30c3\u30bf\u30fc\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u30b7\u30f3\u30d7\u30eb\u306aPOJO\u30af\u30e9\u30b9\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.model;\r\n\r\npublic class User {\r\n\tprivate String userName;\r\n\r\n\tpublic String getUserName() {\r\n\t\treturn userName;\r\n\t}\r\n\r\n\tpublic void setUserName(String userName) {\r\n\t\tthis.userName = userName;\r\n\t}\r\n}\r\n<\/code><\/pre>\n<h3>Spring MVC\u306e\u30d3\u30e5\u30fc\u30da\u30fc\u30b8<\/h3>\n<p>\u4ee5\u4e0b\u3067\u5b9a\u7fa9\u3055\u308c\u305f2\u3064\u306e\u30d3\u30e5\u30fc\u30da\u30fc\u30b8\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002home.jsp<\/p>\n<pre class=\"post-pre\"><code>&lt;%@ page language=\"java\" contentType=\"text\/html; charset=UTF-8\"\r\n\tpageEncoding=\"UTF-8\"%&gt;\r\n&lt;%@ taglib uri=\"https:\/\/java.sun.com\/jsp\/jstl\/core\" prefix=\"c\"%&gt;\r\n&lt;%@ page session=\"false\"%&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Home&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\t&lt;h1&gt;Hello world!&lt;\/h1&gt;\r\n\r\n\t&lt;P&gt;The time on the server is ${serverTime}.&lt;\/p&gt;\r\n\r\n\t&lt;form action=\"user\" method=\"post\"&gt;\r\n\t\t&lt;input type=\"text\" name=\"userName\"&gt;&lt;br&gt; &lt;input\r\n\t\t\ttype=\"submit\" value=\"Login\"&gt;\r\n\t&lt;\/form&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<p>\u30e6\u30fc\u30b6\u30fc.jsp<\/p>\n<pre class=\"post-pre\"><code>&lt;%@ page language=\"java\" contentType=\"text\/html; charset=UTF-8\"\r\n    pageEncoding=\"UTF-8\"%&gt;\r\n&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\" \"https:\/\/www.w3.org\/TR\/html4\/loose.dtd\"&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\"&gt;\r\n&lt;title&gt;User Home Page&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h3&gt;Hi ${userName}&lt;\/h3&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<p>Spring MVC\u306f\u3001\u30d5\u30a9\u30fc\u30e0\u306e\u5909\u6570\u3092\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u306e\u5909\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u3053\u3068\u3092\u81ea\u52d5\u7684\u306b\u51e6\u7406\u3057\u3066\u304f\u308c\u308b\u3053\u3068\u306b\u6c17\u3065\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u305f\u3081\u3001\u4e21\u65b9\u306e\u5834\u6240\u3067\u540c\u3058\u5909\u6570\u540d\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3067\u3001\u79c1\u305f\u3061\u306eSpring MVC\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u30c7\u30d7\u30ed\u30a4\u3068\u30c6\u30b9\u30c8\u306e\u6e96\u5099\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>Spring MVC\u306eEclipse\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30d7\u30ed\u30a4<\/h3>\n<p>Eclipse\u306eWAR\u30d5\u30a1\u30a4\u30eb\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3057\u3066\u3001\u5b9f\u884c\u4e2d\u306eTomcat\u30b5\u30fc\u30d0\u30fc\u306ewebapps\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u76f4\u63a5\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30d3\u30eb\u30c9\u3057\u3066\u304b\u3089\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u304a\u597d\u307f\u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30b3\u30f3\u30c6\u30ca\u306e\u30c7\u30d7\u30ed\u30a4\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>Spring MVC\u306e\u30c6\u30b9\u30c8\u306e\u4f8b<\/h3>\n<p>\u6625\u306eMVC\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u30c7\u30d7\u30ed\u30a4\u3055\u308c\u308b\u3068\u3001https:\/\/localhost:8080\/spring-mvc-example\/\u3067\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002Tomcat\u306e\u30dd\u30fc\u30c8\u3068\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30eb\u30fc\u30c8\u3092\u9069\u5207\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3067\u6625\u306eMVC\u306e\u4f8b\u306f\u4ee5\u4e0a\u3067\u3059\u3002\u53ef\u80fd\u306a\u9650\u308a\u30b7\u30f3\u30d7\u30eb\u306b\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u304c\u3001\u4f55\u304b\u554f\u984c\u304c\u3042\u308c\u3070\u30b3\u30e1\u30f3\u30c8\u3067\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u52a9\u3051\u306b\u306a\u308b\u3088\u3046\u306b\u52aa\u3081\u307e\u3059\u3002\u6700\u7d42\u7684\u306aSpring MVC\u306e\u4f8b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u300cSpring MVC\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u300d<\/p>\n<p>\u53c2\u8003\u6587\u732e\uff1a\u516c\u5f0f\u30b5\u30a4\u30c8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300cSpring MVC\u306e\u4f8b\u3078\u3088\u3046\u3053\u305d\u3002\u4ee5\u524d\u306bSpring MVC\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u3001Spring Tool Suite\u3092\u4f7f\u7528\u3057\u3066Spring MVC\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u4eca\u65e5\u306fmaven\u3068E [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-807","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>Spring MVC \u306e\u4f8b - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Spring MVC \u306e\u4f8b\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\/spring-mvc-\u306e\u4f8b\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring MVC \u306e\u4f8b\" \/>\n<meta property=\"og:description\" content=\"Spring MVC \u306e\u4f8b\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\/spring-mvc-\u306e\u4f8b\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-14T22:18:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T17:37:56+00:00\" \/>\n<meta name=\"author\" content=\"\u7dbe\u4e43, \u4e00\u5e0c\" \/>\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=\"\u7dbe\u4e43, \u4e00\u5e0c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"24\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\/spring-mvc-%e3%81%ae%e4%be%8b\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/\",\"name\":\"Spring MVC \u306e\u4f8b - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-11-14T22:18:53+00:00\",\"dateModified\":\"2025-07-31T17:37:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/601389077b7f4e4ad6115428e3b73bff\"},\"description\":\"Spring MVC \u306e\u4f8b\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\/spring-mvc-%e3%81%ae%e4%be%8b\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring MVC \u306e\u4f8b\"}]},{\"@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\/601389077b7f4e4ad6115428e3b73bff\",\"name\":\"\u7dbe\u4e43, \u4e00\u5e0c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g\",\"caption\":\"\u7dbe\u4e43, \u4e00\u5e0c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/ayanokazuki\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Spring MVC \u306e\u4f8b - Blog - Silicon Cloud","description":"Spring MVC \u306e\u4f8b\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\/spring-mvc-\u306e\u4f8b\/","og_locale":"ja_JP","og_type":"article","og_title":"Spring MVC \u306e\u4f8b","og_description":"Spring MVC \u306e\u4f8b\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\/spring-mvc-\u306e\u4f8b\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-11-14T22:18:53+00:00","article_modified_time":"2025-07-31T17:37:56+00:00","author":"\u7dbe\u4e43, \u4e00\u5e0c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u7dbe\u4e43, \u4e00\u5e0c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"24\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/","name":"Spring MVC \u306e\u4f8b - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-11-14T22:18:53+00:00","dateModified":"2025-07-31T17:37:56+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/601389077b7f4e4ad6115428e3b73bff"},"description":"Spring MVC \u306e\u4f8b\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\/spring-mvc-%e3%81%ae%e4%be%8b\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Spring MVC \u306e\u4f8b"}]},{"@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\/601389077b7f4e4ad6115428e3b73bff","name":"\u7dbe\u4e43, \u4e00\u5e0c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g","caption":"\u7dbe\u4e43, \u4e00\u5e0c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/ayanokazuki\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/spring-mvc-%e3%81%ae%e4%be%8b\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/807","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=807"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/807\/revisions"}],"predecessor-version":[{"id":45258,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/807\/revisions\/45258"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}