{"id":305,"date":"2023-10-09T10:29:08","date_gmt":"2023-05-13T02:10:18","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/"},"modified":"2025-07-31T22:30:28","modified_gmt":"2025-07-31T13:30:28","slug":"spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/","title":{"rendered":"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b"},"content":{"rendered":"<p>\u4eca\u65e5\u306f\u3001Spring Security\u306e\u30ed\u30b0\u30a4\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002\u3053\u306e\u6295\u7a3f\u3092\u8aad\u3080\u524d\u306b\u3001\u300cSpring 4\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u7d39\u4ecb\u300d\u306e\u79c1\u306e\u524d\u306e\u6295\u7a3f\u3092\u4e00\u8aad\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30b9\u30d7\u30ea\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u3088\u308b\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u4f8b<\/h2>\n<p>\u3053\u306e\u30dd\u30b9\u30c8\u3067\u306f\u3001In-Memory\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u3068\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306bSpring 4 MVC Security Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3057\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001Spring Java Config\u3068Spring Annotations\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001web.xml\u3084Spring XML Configuration\uff08\u53e4\u3044\u30b9\u30bf\u30a4\u30eb\uff09\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u3082\u3057Spring 3.x Security Module\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u5834\u5408\u306f\u3001\u307e\u305a\u4ee5\u4e0b\u306e\u30dd\u30b9\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>JDBC\u8a8d\u8a3c\u3092\u4f7f\u7528\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u8a73\u7d30\u60c5\u5831\u3068\u30a4\u30f3\u30e1\u30e2\u30ea\u3092\u5229\u7528\u3057\u305fSpring MVC\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u4f8b<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>DAO\u3001JDBC\u3001\u30a4\u30f3\u30e1\u30e2\u30ea\u8a8d\u8a3c\u3092\u4f7f\u7528\u3057\u305f\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308bSpring\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u4f8b<\/ol>\n<p>\u300cSpring 4 Security\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u4fdd\u5b58\u30fb\u7ba1\u7406\u3057\u307e\u3059\u3002\u300d<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30a4\u30f3\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u95a2\u4fc2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff08RDBMS\uff09<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>NoSQL\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>LDAP<\/ol>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u300cIn-Memory Store\u300d\u3068\u3044\u3046\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u4ed6\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u306f\u3001\u79c1\u306e\u6b21\u306e\u6295\u7a3f\u3067\u8aac\u660e\u3057\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001Spring 4.0.2.RELEASE\u3001Spring STS 3.7 Suite IDE\u3001Spring TC Server 3.1\u3001Java 1.8\u3001\u304a\u3088\u3073Maven\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u958b\u767a\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u30ed\u30b0\u30a4\u30f3\u306e\u4f8b<\/h3>\n<p>\u79c1\u305f\u3061\u306f\u3001Spring 4\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u3068\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u30ed\u30b8\u30c3\u30af\u3092\u958b\u767a\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4e3b\u306a\u76ee\u7684\u306f\u3001\u300cweb.xml\u300d\u3092\u4f7f\u7528\u305b\u305a\u3001Spring XML Beans\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u5207\u66f8\u304b\u306a\u3044\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3064\u307e\u308a\u3001Spring\u306eJava Config\u6a5f\u80fd\u3068Spring\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002\u6b21\u306e\u6a5f\u80fd\u3092\u6301\u3064\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3057\u307e\u3059\uff1a<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30a6\u30a7\u30eb\u30ab\u30e0\u30da\u30fc\u30b8<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30db\u30fc\u30e0\u30da\u30fc\u30b8<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u30ed\u30b0\u30a2\u30a6\u30c8\u6a5f\u80fd<\/ol>\n<p>\u3053\u306eSpring 4 Security Simple Login Example\u3092\u958b\u767a\u3057\u3001\u63a2\u7d22\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Create a \u201cSimple Spring Web Maven\u201d Project in Spring STS Suite with the following details<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>   Project Name : SpringMVCSecruityMavenApp\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li>Update pom.xml with the following content<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;project\r\n   xsi:schemaLocation=\"https:\/\/maven.apache.org\/POM\/4.0.0 \r\n   https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"\r\n   xmlns=\"https:\/\/maven.apache.org\/POM\/4.0.0\" \r\n   xmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"&gt;\r\n\r\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\r\n\t&lt;groupId&gt;com.scdev&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;SpringMVCSecruityMavenApp&lt;\/artifactId&gt;\r\n\t&lt;packaging&gt;war&lt;\/packaging&gt;\r\n\t&lt;version&gt;1.0&lt;\/version&gt;\r\n\r\n\t&lt;properties&gt;\r\n\t    &lt;java.version&gt;1.8&lt;\/java.version&gt;\r\n\t    &lt;spring.version&gt;4.0.2.RELEASE&lt;\/spring.version&gt;\r\n\t    &lt;spring.security.version&gt;4.0.2.RELEASE&lt;\/spring.security.version&gt;\r\n\t    &lt;servlet.api.version&gt;3.1.0&lt;\/servlet.api.version&gt;\r\n\t    &lt;jsp.api.version&gt;2.2&lt;\/jsp.api.version&gt;\r\n\t    &lt;jstl.version&gt;1.2&lt;\/jstl.version&gt;\r\n\t&lt;\/properties&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-core&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${spring.version}&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;${spring.version}&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-webmvc&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${spring.version}&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.security&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;spring-security-web&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${spring.security.version}&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.security&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;spring-security-config&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${spring.security.version}&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;javax.servlet&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;javax.servlet-api&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${servlet.api.version}&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\t\t\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;${jsp.api.version}&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;jstl&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;jstl&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${jstl.version}&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t&lt;\/dependencies&gt;\t\r\n\r\n\t&lt;build&gt;\r\n\t    &lt;finalName&gt;SpringMVCSecruityMavenApp&lt;\/finalName&gt;\r\n\t    &lt;plugins&gt;\r\n\t\t&lt;plugin&gt;\r\n\t\t     &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n\t\t     &lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;\r\n\t\t     &lt;version&gt;3.1&lt;\/version&gt;\r\n\t\t     &lt;configuration&gt;\r\n\t\t\t&lt;source&gt;${java.version}&lt;\/source&gt;\r\n\t\t\t&lt;target&gt;${java.version}&lt;\/target&gt;\r\n\t\t     &lt;\/configuration&gt;\r\n\t\t&lt;\/plugin&gt;\r\n\t\t&lt;plugin&gt;\r\n\t           &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n\t           &lt;artifactId&gt;maven-war-plugin&lt;\/artifactId&gt;\r\n\t           &lt;configuration&gt;\r\n\t              &lt;failOnMissingWebXml&gt;false&lt;\/failOnMissingWebXml&gt;\r\n\t           &lt;\/configuration&gt;           \r\n        \t&lt;\/plugin&gt;\r\n\t    &lt;\/plugins&gt;\r\n\t&lt;\/build&gt;\r\n&lt;\/project&gt;\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306f\u3001\u65e5\u672c\u8a9e\u3067\u306e\u540c\u7fa9\u8868\u73fe\u3067\u3059\uff08\u6ce8\uff1a\u5fc5\u8981\u306a\u306e\u306f\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u3067\u3059\uff09\uff1a<br \/>\n\uff1cfailOnMissingWebXml\uff1e\u30d5\u30e9\u30b0\u306b\u3064\u3044\u3066\u77e5\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u3053\u306e\u6295\u7a3f\u306e\u6700\u5f8c\u3092\u8aad\u3093\u3067\u3001\u3053\u306e\u8981\u7d20\u306e\u4f7f\u7528\u65b9\u6cd5\u3092\u7406\u89e3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305a\u3001Spring\u306e\uff20Controller\u6ce8\u91c8\u3092\u4f7f\u7528\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u958b\u767a\u3057\u3066\u304f\u3060\u3055\u3044\u3002LoginController.java<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.web.controller;\r\n\r\nimport org.springframework.stereotype.Controller;\r\nimport org.springframework.web.bind.annotation.RequestMapping;\r\nimport org.springframework.web.bind.annotation.RequestMethod;\r\nimport org.springframework.web.bind.annotation.RequestParam;\r\nimport org.springframework.web.servlet.ModelAndView;\r\n\r\n@Controller\r\npublic class LoginController {\r\n\r\n\t@RequestMapping(value = { \"\/\"}, method = RequestMethod.GET)\r\n\tpublic ModelAndView welcomePage() {\r\n\t\tModelAndView model = new ModelAndView();\r\n\t\tmodel.setViewName(\"welcomePage\");\r\n\t\treturn model;\r\n\t}\r\n\r\n\t@RequestMapping(value = { \"\/homePage\"}, method = RequestMethod.GET)\r\n\tpublic ModelAndView homePage() {\r\n\t\tModelAndView model = new ModelAndView();\r\n\t\tmodel.setViewName(\"homePage\");\r\n\t\treturn model;\r\n\t}\r\n\t\r\n\t@RequestMapping(value = \"\/loginPage\", method = RequestMethod.GET)\r\n\tpublic ModelAndView loginPage(@RequestParam(value = \"error\",required = false) String error,\r\n\t@RequestParam(value = \"logout\",\trequired = false) String logout) {\r\n\t\t\r\n\t\tModelAndView model = new ModelAndView();\r\n\t\tif (error != null) {\r\n\t\t\tmodel.addObject(\"error\", \"Invalid Credentials provided.\");\r\n\t\t}\r\n\r\n\t\tif (logout != null) {\r\n\t\t\tmodel.addObject(\"message\", \"Logged out from JournalDEV successfully.\");\r\n\t\t}\r\n\r\n\t\tmodel.setViewName(\"loginPage\");\r\n\t\treturn model;\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u30b3\u30fc\u30c9\u306e\u8aac\u660e\uff1a\u300cLoginController\u300d\u306b\u306f\u30013\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308a\u3001\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u7a2e\u985e\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>welcomePage()\u306f\u3001&#8221;\/&#8221; URI\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>homePage()\u306f\u3001&#8221;\/homePage&#8221; URI\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>loginPage()\u306f\u3001&#8221;\/loginPage&#8221; URI\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>loginPage()\u3067\u306f\u3001\u30a8\u30e9\u30fc\u3068\u30ed\u30b0\u30a2\u30a6\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u51e6\u7406\u306b\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/ol>\n<ul class=\"post-ul\">\n<li>Then develop a class \u201cLoginSecurityConfig\u201d to provide Login and Logout Security Features using Spring 4 Security API.<br \/>\nLoginSecurityConfig.java<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>package com.scdev.spring.secuity.config;\r\n\r\nimport org.springframework.beans.factory.annotation.Autowired;\r\nimport org.springframework.context.annotation.Configuration;\r\nimport org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;\r\nimport org.springframework.security.config.annotation.web.builders.HttpSecurity;\r\nimport org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;\r\nimport org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;\r\n\r\n@Configuration\r\n@EnableWebSecurity\r\npublic class LoginSecurityConfig extends WebSecurityConfigurerAdapter {\r\n\r\n\t@Autowired\r\n\tpublic void configureGlobal(AuthenticationManagerBuilder authenticationMgr) throws Exception {\r\n\t\tauthenticationMgr.inMemoryAuthentication()\r\n\t\t\t.withUser(\"scdev\")\r\n\t\t\t.password(\"jd@123\")\r\n\t\t\t.authorities(\"ROLE_USER\");\r\n\t}\r\n\t\r\n\t@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\thttp.authorizeRequests()\r\n\t\t\t.antMatchers(\"\/homePage\").access(\"hasRole('ROLE_USER')\")\r\n\t\t\t.and()\r\n\t\t\t\t.formLogin().loginPage(\"\/loginPage\")\r\n\t\t\t\t.defaultSuccessUrl(\"\/homePage\")\r\n\t\t\t\t.failureUrl(\"\/loginPage?error\")\r\n\t\t\t\t.usernameParameter(\"username\").passwordParameter(\"password\")\t\t\t\t\r\n\t\t\t.and()\r\n\t\t\t\t.logout().logoutSuccessUrl(\"\/loginPage?logout\"); \r\n\t\t\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u30b3\u30fc\u30c9\u306e\u8aac\u660e\uff1a\u300cLoginSecurityConfig\u300d\u30672\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u8cc7\u683c\u60c5\u5831\u3092\u4fdd\u5b58\u30fb\u7ba1\u7406\u3057\u3001\u30ed\u30b0\u30a4\u30f3\u304a\u3088\u3073\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u6a5f\u80fd\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>@EnableWebSecurity\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u4efb\u610f\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067Web\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>@EnableWebMVCSecurity\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001Spring MVC\u30d9\u30fc\u30b9\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067Web\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6ce8\u610f\uff1a@EnableWebSecurity = @EnableWebMVCSecurity + \u8ffd\u52a0\u6a5f\u80fd\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001Spring 4.x\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u306f@EnableWebMVCSecurity\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u975e\u63a8\u5968\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u30024.\u300cLoginSecurityConfig\u300d\u30af\u30e9\u30b9\u307e\u305f\u306fSpring\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306b\u6307\u5b9a\u3055\u308c\u305f\u30af\u30e9\u30b9\u306f\u3001\u300cWebSecurityConfigurerAdapter\u300d\u30af\u30e9\u30b9\u3092\u62e1\u5f35\u3059\u308b\u304b\u3001\u95a2\u9023\u3059\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>configureGlobal()\u30e1\u30bd\u30c3\u30c9\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u8cc7\u683c\u60c5\u5831\u3092\u4fdd\u7ba1\u304a\u3088\u3073\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>configureGlobal()\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001authorities()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u300cROLE_USER\u300d\u306a\u3069\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5f79\u5272\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u540c\u3058\u76ee\u7684\u3067roles()\u30e1\u30bd\u30c3\u30c9\u3082\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>authorities()\u30e1\u30bd\u30c3\u30c9\u3068roles()\u30e1\u30bd\u30c3\u30c9\u306e\u9055\u3044:<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>authorities()\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u300cROLE_USER\u300d\u306e\u3088\u3046\u306a\u5b8c\u5168\u306a\u30ed\u30fc\u30eb\u540d\u304c\u5fc5\u8981\u3067\u3059\u3002roles()\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u300cUSER\u300d\u306e\u3088\u3046\u306a\u30ed\u30fc\u30eb\u540d\u304c\u5fc5\u8981\u3067\u3001\u300cUSER\u300d\u3068\u3044\u3046\u30ed\u30fc\u30eb\u540d\u306b\u300cROLE_\u300d\u306e\u5024\u304c\u81ea\u52d5\u7684\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002\u6ce8\u610f\uff1a\u5c06\u6765\u306e\u6295\u7a3f\u3067\u300cUSER\u300d\u3001\u300cADMIN\u300d\u306a\u3069\u306e\u30ed\u30fc\u30eb\u3092\u793a\u3059\u305f\u3081\u306e\u5225\u306e\u4f8b\u3092\u958b\u767a\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30ed\u30b0\u30a4\u30f3\u304a\u3088\u3073\u30ed\u30b0\u30a2\u30a6\u30c8\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u91cd\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u306fconfigure(HttpSecurity http)\u3067\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u30b9\u30cb\u30da\u30c3\u30c8\u306f\u3001\u300c\/homePage\u300d\u3078\u306e\u4e0d\u6b63\u306a\u30a2\u30af\u30bb\u30b9\u3092\u9632\u3050\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30da\u30fc\u30b8\u306b\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b\u300c\/loginPage\u300d\u30da\u30fc\u30b8\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u308c\u307e\u3059\u3002<\/ol>\n<pre class=\"post-pre\"><code>.antMatchers(\"\/homePage\").access(\"hasRole('ROLE_USER')\")\r\n<\/code><\/pre>\n<p>\u300caccess\uff08&#8217;ROLE_USER&#8217;\uff09\u300d\u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\u3092\u524a\u9664\u3059\u308c\u3070\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30ed\u30b0\u30a4\u30f3\u305b\u305a\u306b\u3053\u306e\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u300213. \u30d5\u30a9\u30fc\u30e0\u30ed\u30b0\u30a4\u30f3\uff08\uff09\u304a\u3088\u3073\u30ed\u30b0\u30a2\u30a6\u30c8\uff08\uff09\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u304a\u3088\u3073\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u6a5f\u80fd\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Enable Spring MVC Configuration<br \/>\nLoginApplicationConfig.java<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>package com.scdev.spring.secuity.config;\r\n\r\nimport org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.ComponentScan;\r\nimport org.springframework.context.annotation.Configuration;\r\nimport org.springframework.context.annotation.Import;\r\nimport org.springframework.web.servlet.config.annotation.EnableWebMvc;\r\nimport org.springframework.web.servlet.view.InternalResourceViewResolver;\r\nimport org.springframework.web.servlet.view.JstlView;\r\n\r\n@EnableWebMvc\r\n@Configuration\r\n@ComponentScan({ \"com.scdev.spring.*\" })\r\n@Import(value = { LoginSecurityConfig.class })\r\npublic class LoginApplicationConfig {\r\n\t@Bean\r\n\tpublic InternalResourceViewResolver viewResolver() {\r\n\t\tInternalResourceViewResolver viewResolver = new InternalResourceViewResolver();\r\n\t\tviewResolver.setViewClass(JstlView.class);\r\n\t\tviewResolver.setPrefix(\"\/WEB-INF\/views\/\");\r\n\t\tviewResolver.setSuffix(\".jsp\");\r\n\t\treturn viewResolver;\r\n\t}\r\n\t\r\n}\r\n<\/code><\/pre>\n<p>\u30b3\u30fc\u30c9\u306e\u8aac\u660e\uff1a\u300cLoginApplicationConfig\u300d\u3068\u3044\u3046\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001Spring MVC\u30d3\u30e5\u30fc\u30ea\u30be\u30eb\u30d0\u3092\u5b9a\u7fa9\u3057\u3066\u3001&#8221;web.xml&#8221;\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304b\u305a\u306b\u6e08\u307e\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>@EnableWebMvc\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067Spring Web MVC\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>@Import\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u3053\u306e\u30af\u30e9\u30b9\u306bSpring Security\u8a2d\u5b9a\u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>@ComponentScan\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30b9\u30ad\u30e3\u30f3\u3092\u884c\u3046\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306fSpring XML\u8a2d\u5b9a\u306e\u300ccontext:component-scan\u300d\u3068\u7b49\u4fa1\u3067\u3059\u3002<\/ol>\n<ul class=\"post-ul\">\n<li>Initialize Spring Security<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>package com.scdev.spring.secuity.config.core;\r\n\r\nimport org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;\r\n\r\npublic class SpringSecurityInitializer extends AbstractSecurityWebApplicationInitializer {\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u300cSpringSecurityInitializer\u300d\u306f\u3001springSecurityFilterChain\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306bDelegatingFilterProxy\u3092\u767b\u9332\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001web.xml\u30d5\u30a1\u30a4\u30eb\u306b\u30d5\u30a3\u30eb\u30bf\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u305b\u3093\u3002 -Spring MVC\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u521d\u671f\u5316<br \/>\n\u300cSpringMVCWebAppInitializer\u300d\u30af\u30e9\u30b9\u306f\u3001\u6ce8\u91c8\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u3067web.xml\u30d5\u30a1\u30a4\u30eb\u306a\u3057\u3067\u300cDispatcherServlet\u300d\u3092\u521d\u671f\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002SpringMVCWebAppInitializer.java<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.secuity.config.core;\r\n\r\nimport org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;\r\nimport com.scdev.spring.secuity.config.LoginApplicationConfig;\r\n\r\npublic class SpringMVCWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {\r\n\r\n\t@Override\r\n\tprotected Class&lt;?&gt;[] getRootConfigClasses() {\r\n\t\treturn new Class[] { LoginApplicationConfig.class };\r\n\t}\r\n\r\n\t@Override\r\n\tprotected Class&lt;?&gt;[] getServletConfigClasses() {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t@Override\r\n\tprotected String[] getServletMappings() {\r\n\t\treturn new String[] { \"\/\" };\r\n\t}\r\n\t\r\n}\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\uff081\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u5fc5\u8981\u3067\u3059\uff09\uff1a<br \/>\n\u6ce8\u610f\uff1a<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u79c1\u305f\u3061\u304c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067SpringMVCWebAppInitializer\u306egetServletMappings\uff08\uff09\u306f\u30eb\u30fc\u30c8URL\u300c\/\u300d\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\u3057\u307e\u3059\u3002\u5225\u306eURL\u306b\u8ee2\u9001\u3059\u308b\u3088\u3046\u306b\u4e0a\u66f8\u304d\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>Spring\u307e\u305f\u306fPivotal\u306e\u30c1\u30fc\u30e0\u306f\u3001\u3053\u306e\u591a\u304f\u306eJava\u30b3\u30fc\u30c9\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u6ce8\u91c8\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u306e\u554f\u984c\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306fhttps:\/\/jira.spring.io\/browse\/SPR-10359\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002<\/ol>\n<ul class=\"post-ul\">\n<li>Develop welcomePage.jsp file<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>&lt;h3&gt;Welcome to JournalDEV Tutorials&lt;\/h3&gt;\r\n&lt;a href=\"${pageContext.request.contextPath}\/loginPage\"&gt;Login to Journal&lt;\/a&gt;\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li>Develop loginPage.jsp file<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>&lt;%@ taglib prefix=\"c\" uri=\"https:\/\/java.sun.com\/jsp\/jstl\/core\"%&gt;\r\n&lt;html&gt;\r\n&lt;body onload='document.loginForm.username.focus();'&gt;\r\n\t&lt;h3&gt;JournalDEV Tutorials&lt;\/h3&gt;\r\n\r\n\t&lt;c:if test=\"${not empty error}\"&gt;&lt;div&gt;${error}&lt;\/div&gt;&lt;\/c:if&gt;\r\n\t&lt;c:if test=\"${not empty message}\"&gt;&lt;div&gt;${message}&lt;\/div&gt;&lt;\/c:if&gt;\r\n\r\n\t&lt;form name='login' action=\"&lt;c:url value='\/loginPage' \/&gt;\" method='POST'&gt;\r\n\t\t&lt;table&gt;\r\n\t\t\t&lt;tr&gt;\r\n\t\t\t\t&lt;td&gt;UserName:&lt;\/td&gt;\r\n\t\t\t\t&lt;td&gt;&lt;input type='text' name='username' value=''&gt;&lt;\/td&gt;\r\n\t\t\t&lt;\/tr&gt;\r\n\t\t\t&lt;tr&gt;\r\n\t\t\t\t&lt;td&gt;Password:&lt;\/td&gt;\r\n\t\t\t\t&lt;td&gt;&lt;input type='password' name='password' \/&gt;&lt;\/td&gt;\r\n\t\t\t&lt;\/tr&gt;\r\n\t\t\t&lt;tr&gt;\r\n\t\t\t\t&lt;td colspan='2'&gt;&lt;input name=\"submit\" type=\"submit\" value=\"submit\" \/&gt;&lt;\/td&gt;\r\n\t\t\t&lt;\/tr&gt;\r\n\t\t&lt;\/table&gt;\r\n\t\t&lt;input type=\"hidden\" name=\"${_csrf.parameterName}\" value=\"${_csrf.token}\" \/&gt;\r\n\t&lt;\/form&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li>Develop homepage.jsp file<\/li>\n<\/ul>\n<pre class=\"post-pre\"><code>&lt;%@taglib prefix=\"c\" uri=\"https:\/\/java.sun.com\/jsp\/jstl\/core\"%&gt;\r\n&lt;h3&gt;Welcome to JournalDEV Tutorials&lt;\/h3&gt;\r\n&lt;ul&gt;\r\n\t&lt;li&gt;Java 8 tutorial&lt;\/li&gt;\r\n\t&lt;li&gt;Spring tutorial&lt;\/li&gt;\r\n\t&lt;li&gt;Gradle tutorial&lt;\/li&gt;\r\n\t&lt;li&gt;BigData tutorial&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n\r\n&lt;c:url value=\"\/logout\" var=\"logoutUrl\" \/&gt;\r\n&lt;form id=\"logout\" action=\"${logoutUrl}\" method=\"post\" &gt;\r\n  &lt;input type=\"hidden\" name=\"${_csrf.parameterName}\" value=\"${_csrf.token}\" \/&gt;\r\n&lt;\/form&gt;\r\n&lt;c:if test=\"${pageContext.request.userPrincipal.name != null}\"&gt;\r\n\t&lt;a href=\"javascript:document.getElementById('logout').submit()\"&gt;Logout&lt;\/a&gt;\r\n&lt;\/c:if&gt;\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li>Final Project Structure looks like this:<\/li>\n<\/ul>\n<h3>\u300cSpring Security MVC\u306e\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u4f8b\u3092\u5b9f\u884c\u3059\u308b\u300d<\/h3>\n<p>\u3053\u306eSpring Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u3001Spring 4 \u304a\u3088\u3073 Java 8 \u306e\u74b0\u5883\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308bWeb\u30b3\u30f3\u30c6\u30ca\u30fc\u3068\u3057\u3066Servlet 3.1.0 \u30b3\u30f3\u30c6\u30ca\u30fc\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Deploy and Run on Spring TC Server in Spring STS Suite<\/li>\n<li>It automatically access our application welcome page url as shown below.<br \/>\n&#8211; click on \u201cLogin to JournalDEV\u201d link to access login page.<br \/>\n&#8211; Now, provide wrong login details and click on \u201cLogin\u201d button.<br \/>\nHere we can observe this error message: \u201cInvalid Credentials provided.\u201d- Now, provide correct login details configured in \u201cLoginSecurityConfig\u201d class.<br \/>\nAfter successful login to our application, we can see our Application Homepage with the \u201cLogout\u201d link.- click on \u201cLogout\u201d link to logout from Application.<br \/>\nHere we can observe that we are Logged out from our application successfully and redirected to Login page again. We can observe some Log out successful message in this Login page.<\/li>\n<\/ul>\n<p>\u6b21\u306e\u4f8b\u3092\u898b\u308b\u3068\u3001web.xml\u30d5\u30a1\u30a4\u30eb\u306f\u4f7f\u7528\u3057\u3066\u3044\u307e\u305b\u3093\u3002Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3042\u308b\u305f\u3081\u3001Maven\u306fweb.xml\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5185\u3067\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u306b\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002Maven\u95a2\u9023\u306e\u554f\u984c\u3092\u56de\u907f\u3059\u308b\u305f\u3081\u306b\u3001pom.xml\u30d5\u30a1\u30a4\u30eb\u3067\u300c\u300d\u30d5\u30e9\u30b0\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u4e0a\u304cSpring 4\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u4f8b\u3067\u3059\u3002\u79c1\u306e\u6b21\u306e\u6295\u7a3f\u3067\u306f\u3001\u5f79\u306b\u7acb\u3064\u3088\u308a\u5b9f\u7528\u7684\u306a\u4f8b\u3092\u3044\u304f\u3064\u304b\u958b\u767a\u3057\u307e\u3059\u3002\u5f79\u8077\u306e\u7ba1\u7406\u3001Remember-Me\u6a5f\u80fd\u3001WebSocket\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306a\u3069\u3001\u6295\u7a3f\u304c\u6c17\u306b\u5165\u3063\u305f\u308a\u554f\u984c\/\u63d0\u6848\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30b3\u30e1\u30f3\u30c8\u3092\u6b8b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5\u306f\u3001Spring Security\u306e\u30ed\u30b0\u30a4\u30f3\u306e\u4f8b\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002\u3053\u306e\u6295\u7a3f\u3092\u8aad\u3080\u524d\u306b\u3001\u300cSpring 4\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u7d39\u4ecb\u300d\u306e\u79c1\u306e\u524d\u306e\u6295\u7a3f\u3092\u4e00\u8aad\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b9\u30d7\u30ea\u30f3\u30b0\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u3088\u308b\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u4f8b \u3053 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-305","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 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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-4-security-mvc-\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b\" \/>\n<meta property=\"og:description\" content=\"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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-4-security-mvc-\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-13T02:10:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T13:30:28+00:00\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\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=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"34\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-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/\",\"name\":\"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-05-13T02:10:18+00:00\",\"dateModified\":\"2025-07-31T13:30:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%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 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b - Blog - Silicon Cloud","description":"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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-4-security-mvc-\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b\/","og_locale":"ja_JP","og_type":"article","og_title":"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b","og_description":"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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-4-security-mvc-\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-05-13T02:10:18+00:00","article_modified_time":"2025-07-31T13:30:28+00:00","author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"34\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/","name":"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\u4f8b - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-05-13T02:10:18+00:00","dateModified":"2025-07-31T13:30:28+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"Spring 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%e4%be%8b\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%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 4 Security MVC \u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u306e\u5b9f\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\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/spring-4-security-mvc-%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%bb%e3%83%ad%e3%82%b0%e3%82%a2%e3%82%a6%e3%83%88%e3%81%ae%e5%ae%9f%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\/305","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=305"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/305\/revisions"}],"predecessor-version":[{"id":38904,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/305\/revisions\/38904"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}