{"id":916,"date":"2023-05-11T04:52:12","date_gmt":"2023-01-04T20:36:23","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/"},"modified":"2025-08-01T03:31:11","modified_gmt":"2025-07-31T18:31:11","slug":"json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/","title":{"rendered":"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b"},"content":{"rendered":"<p>Spring\u306fJava EE\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e2d\u3067\u3082\u6700\u3082\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u4e00\u3064\u3067\u3059\u3002\u4ee5\u524d\u306f\u3001Spring MVC\u3092\u4f7f\u7528\u3057\u3066Java\u30d9\u30fc\u30b9\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u4eca\u65e5\u306f\u3001Spring MVC\u3092\u4f7f\u7528\u3057\u3066Spring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3057\u3001Rest\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u30c6\u30b9\u30c8\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001Spring RestTemplate API\u3092\u4f7f\u7528\u3057\u3066Spring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30d7\u30ea\u30f3\u30b0REST<\/h2>\n<p>\u79c1\u305f\u3061\u306f\u3001\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306eSpring 4.0.0.RELEASE\u3092\u4f7f\u7528\u3057\u3001Spring Jackson JSON\u306e\u7d71\u5408\u3092\u5229\u7528\u3057\u3066JSON\u30ec\u30b9\u30dd\u30f3\u30b9\u3092REST\u30b3\u30fc\u30eb\u306e\u5fdc\u7b54\u3068\u3057\u3066\u9001\u4fe1\u3057\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001Spring STS IDE\u3067\u7c21\u5358\u306bSpring MVC\u306e\u30b9\u30b1\u30eb\u30c8\u30f3\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3092\u62e1\u5f35\u3057\u3066Restful\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306b\u958b\u767a\u3055\u308c\u3066\u3044\u307e\u3059\u3002STS\u3067\u65b0\u3057\u3044Spring MVC\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3001\u6700\u7d42\u7684\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u9806\u756a\u306b\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>Spring\u306eREST\u69cb\u6210XML\u30d5\u30a1\u30a4\u30eb<\/h3>\n<p>\u79c1\u305f\u3061\u306epom.xml\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&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\/maven-v4_0_0.xsd\"&gt;\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;SpringRestExample&lt;\/artifactId&gt;\r\n\t&lt;name&gt;SpringRestExample&lt;\/name&gt;\r\n\t&lt;packaging&gt;war&lt;\/packaging&gt;\r\n\t&lt;version&gt;1.0.0-BUILD-SNAPSHOT&lt;\/version&gt;\r\n\t&lt;properties&gt;\r\n\t\t&lt;java-version&gt;1.6&lt;\/java-version&gt;\r\n\t\t&lt;org.springframework-version&gt;4.0.0.RELEASE&lt;\/org.springframework-version&gt;\r\n\t\t&lt;org.aspectj-version&gt;1.7.4&lt;\/org.aspectj-version&gt;\r\n\t\t&lt;org.slf4j-version&gt;1.7.5&lt;\/org.slf4j-version&gt;\r\n\t\t&lt;jackson.databind-version&gt;2.2.3&lt;\/jackson.databind-version&gt;\r\n\t&lt;\/properties&gt;\r\n\t&lt;dependencies&gt;\r\n\t\t&lt;!-- Jackson --&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;com.fasterxml.jackson.core&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;jackson-databind&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${jackson.databind-version}&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t\t&lt;!-- Spring --&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;${org.springframework-version}&lt;\/version&gt;\r\n\t\t\t&lt;exclusions&gt;\r\n\t\t\t\t&lt;!-- Exclude Commons Logging in favor of SLF4j --&gt;\r\n\t\t\t\t&lt;exclusion&gt;\r\n\t\t\t\t\t&lt;groupId&gt;commons-logging&lt;\/groupId&gt;\r\n\t\t\t\t\t&lt;artifactId&gt;commons-logging&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;\/exclusion&gt;\r\n\t\t\t&lt;\/exclusions&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;${org.springframework-version}&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\r\n\t\t&lt;!-- AspectJ --&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;org.aspectj&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;aspectjrt&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${org.aspectj-version}&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\r\n\t\t&lt;!-- Logging --&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;org.slf4j&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;slf4j-api&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${org.slf4j-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.slf4j&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;jcl-over-slf4j&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${org.slf4j-version}&lt;\/version&gt;\r\n\t\t\t&lt;scope&gt;runtime&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;org.slf4j&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;slf4j-log4j12&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${org.slf4j-version}&lt;\/version&gt;\r\n\t\t\t&lt;scope&gt;runtime&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;log4j&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;log4j&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;1.2.15&lt;\/version&gt;\r\n\t\t\t&lt;exclusions&gt;\r\n\t\t\t\t&lt;exclusion&gt;\r\n\t\t\t\t\t&lt;groupId&gt;javax.mail&lt;\/groupId&gt;\r\n\t\t\t\t\t&lt;artifactId&gt;mail&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;\/exclusion&gt;\r\n\t\t\t\t&lt;exclusion&gt;\r\n\t\t\t\t\t&lt;groupId&gt;javax.jms&lt;\/groupId&gt;\r\n\t\t\t\t\t&lt;artifactId&gt;jms&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;\/exclusion&gt;\r\n\t\t\t\t&lt;exclusion&gt;\r\n\t\t\t\t\t&lt;groupId&gt;com.sun.jdmk&lt;\/groupId&gt;\r\n\t\t\t\t\t&lt;artifactId&gt;jmxtools&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;\/exclusion&gt;\r\n\t\t\t\t&lt;exclusion&gt;\r\n\t\t\t\t\t&lt;groupId&gt;com.sun.jmx&lt;\/groupId&gt;\r\n\t\t\t\t\t&lt;artifactId&gt;jmxri&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;\/exclusion&gt;\r\n\t\t\t&lt;\/exclusions&gt;\r\n\t\t\t&lt;scope&gt;runtime&lt;\/scope&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\r\n\t\t&lt;!-- @Inject --&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;javax.inject&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;javax.inject&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;1&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\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\r\n\t\t&lt;!-- Test --&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.7&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\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-eclipse-plugin&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;version&gt;2.9&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;additionalProjectnatures&gt;\r\n\t\t\t\t\t\t&lt;projectnature&gt;org.springframework.ide.eclipse.core.springnature&lt;\/projectnature&gt;\r\n\t\t\t\t\t&lt;\/additionalProjectnatures&gt;\r\n\t\t\t\t\t&lt;additionalBuildcommands&gt;\r\n\t\t\t\t\t\t&lt;buildcommand&gt;org.springframework.ide.eclipse.core.springbuilder&lt;\/buildcommand&gt;\r\n\t\t\t\t\t&lt;\/additionalBuildcommands&gt;\r\n\t\t\t\t\t&lt;downloadSources&gt;true&lt;\/downloadSources&gt;\r\n\t\t\t\t\t&lt;downloadJavadocs&gt;true&lt;\/downloadJavadocs&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;groupId&gt;org.apache.maven.plugins&lt;\/groupId&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;2.5.1&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;source&gt;1.6&lt;\/source&gt;\r\n\t\t\t\t\t&lt;target&gt;1.6&lt;\/target&gt;\r\n\t\t\t\t\t&lt;compilerArgument&gt;-Xlint:all&lt;\/compilerArgument&gt;\r\n\t\t\t\t\t&lt;showWarnings&gt;true&lt;\/showWarnings&gt;\r\n\t\t\t\t\t&lt;showDeprecation&gt;true&lt;\/showDeprecation&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;groupId&gt;org.codehaus.mojo&lt;\/groupId&gt;\r\n\t\t\t\t&lt;artifactId&gt;exec-maven-plugin&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;version&gt;1.2.1&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;mainClass&gt;org.test.int1.Main&lt;\/mainClass&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\r\n\t&lt;\/build&gt;\r\n&lt;\/project&gt;\r\n<\/code><\/pre>\n<p>\u4eca\u65e5\u306e\u65e5\u4ed8\u3092\u57fa\u6e96\u306b\u3057\u3066\u3001STS\u30c4\u30fc\u30eb\u306f\u79c1\u305f\u3061\u306e\u305f\u3081\u306bpom.xml\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u79c1\u306fSpring Framework\u3001AspectJ\u3001SLF4J\u3001\u304a\u3088\u3073Jackson\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6700\u65b0\u306e\u3082\u306e\u306b\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002\u307b\u3068\u3093\u3069\u306e\u90e8\u5206\u306f\u5171\u901a\u3067\u81ea\u52d5\u751f\u6210\u3055\u308c\u307e\u3059\u304c\u3001\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092JSON\u306b\u5909\u63db\u3057\u305f\u308a\u3001\u9006\u306b\u5909\u63db\u3059\u308b\u305f\u3081\u306bJackson\u306eJSON\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f9d\u5b58\u95a2\u4fc2\u306b\u8ffd\u52a0\u3057\u305f\u3053\u3068\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;web-app version=\"2.5\" xmlns=\"https:\/\/java.sun.com\/xml\/ns\/javaee\"\r\n\txmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"https:\/\/java.sun.com\/xml\/ns\/javaee https:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd\"&gt;\r\n\r\n\t&lt;!-- The definition of the Root Spring Container shared by all Servlets and Filters --&gt;\r\n\t&lt;context-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\/root-context.xml&lt;\/param-value&gt;\r\n\t&lt;\/context-param&gt;\r\n\t\r\n\t&lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;\r\n\t&lt;listener&gt;\r\n\t\t&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;\/listener-class&gt;\r\n\t&lt;\/listener&gt;\r\n\r\n\t&lt;!-- Processes application requests --&gt;\r\n\t&lt;servlet&gt;\r\n\t\t&lt;servlet-name&gt;appServlet&lt;\/servlet-name&gt;\r\n\t\t&lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;\/servlet-class&gt;\r\n\t\t&lt;init-param&gt;\r\n\t\t\t&lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;\r\n\t\t\t&lt;param-value&gt;\/WEB-INF\/spring\/appServlet\/servlet-context.xml&lt;\/param-value&gt;\r\n\t\t&lt;\/init-param&gt;\r\n\t\t&lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;\r\n\t&lt;\/servlet&gt;\r\n\t\t\r\n\t&lt;servlet-mapping&gt;\r\n\t\t&lt;servlet-name&gt;appServlet&lt;\/servlet-name&gt;\r\n\t\t&lt;url-pattern&gt;\/&lt;\/url-pattern&gt;\r\n\t&lt;\/servlet-mapping&gt;\r\n\r\n&lt;\/web-app&gt;\r\n<\/code><\/pre>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u81ea\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u3066\u304a\u308a\u3001\u79c1\u306f\u305d\u306e\u4e2d\u306e\u4f55\u3082\u5909\u66f4\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3068\u305d\u306e\u5834\u6240\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306f\u3001web.xml\u30d5\u30a1\u30a4\u30eb\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/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=\"https:\/\/www.springframework.org\/schema\/beans https:\/\/www.springframework.org\/schema\/beans\/spring-beans.xsd\"&gt;\r\n\t\r\n\t&lt;!-- Root Context: defines shared resources visible to all other web components --&gt;\r\n\t\t\r\n&lt;\/beans&gt;\r\n<\/code><\/pre>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u3001\u3059\u3079\u3066\u306e\u30a6\u30a7\u30d6\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u8868\u793a\u3055\u308c\u308b\u5171\u6709\u30ea\u30bd\u30fc\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u79c1\u305f\u3061\u306f\u30b7\u30f3\u30d7\u30eb\u306aREST\u30b5\u30fc\u30d3\u30b9\u3092\u958b\u767a\u3059\u308b\u4e88\u5b9a\u3067\u3042\u308a\u3001\u305d\u306e\u305f\u3081\u3053\u3053\u3067\u306f\u4f55\u3082\u5909\u66f4\u3057\u3066\u3044\u307e\u305b\u3093\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\"\r\n\txmlns: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 infrastructure --&gt;\r\n\t\r\n\t&lt;!-- Enables the Spring MVC @Controller programming model --&gt;\r\n\t&lt;annotation-driven \/&gt;\r\n\r\n\t&lt;!-- Handles HTTP GET requests for \/resources\/** by efficiently serving up static resources in the ${webappRoot}\/resources directory --&gt;\r\n\t&lt;resources mapping=\"\/resources\/**\" location=\"\/resources\/\" \/&gt;\r\n\r\n\t&lt;!-- Resolves views selected for rendering by @Controllers to .jsp resources in the \/WEB-INF\/views directory --&gt;\r\n\t&lt;beans:bean class=\"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\t\r\n\t&lt;!-- Configure to plugin JSON as request and response in method handler --&gt;\r\n\t&lt;beans:bean class=\"org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter\"&gt;\r\n\t\t&lt;beans:property name=\"messageConverters\"&gt;\r\n\t\t\t&lt;beans:list&gt;\r\n\t\t\t\t&lt;beans:ref bean=\"jsonMessageConverter\"\/&gt;\r\n\t\t\t&lt;\/beans:list&gt;\r\n\t\t&lt;\/beans:property&gt;\r\n\t&lt;\/beans:bean&gt;\r\n\t\r\n\t&lt;!-- Configure bean to convert JSON to POJO and vice versa --&gt;\r\n\t&lt;beans:bean id=\"jsonMessageConverter\" class=\"org.springframework.http.converter.json.MappingJackson2HttpMessageConverter\"&gt;\r\n\t&lt;\/beans:bean&gt;\t\r\n\t\r\n\t&lt;context:component-scan base-package=\"com.scdev.spring.controller\" \/&gt;\r\n\t\r\n&lt;\/beans:beans&gt;\r\n<\/code><\/pre>\n<p>\u307b\u3068\u3093\u3069\u306e\u90e8\u5206\u306f\u81ea\u52d5\u751f\u6210\u3055\u308c\u3001\u30dc\u30a4\u30e9\u30fc\u30d7\u30ec\u30fc\u30c8\u306e\u8a2d\u5b9a\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u6ce8\u91c8\u30d9\u30fc\u30b9\u306e\u69cb\u6210\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306e\u6ce8\u91c8\u30c9\u30ea\u30d6\u30f3\u306e\u8981\u7d20\u3084\u3001RequestMappingHandlerAdapter\u306emessageConverters\u306bMappingJackson2HttpMessageConverter\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u306b\u3088\u308a\u3001Jackson API\u304c\u8d77\u52d5\u3057\u3001JSON\u3092Java\u306eBeans\u306b\u5909\u63db\u3059\u308b\u3088\u3046\u306b\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u30dc\u30c7\u30a3\u306bJSON\u3092\u4f7f\u7528\u3057\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u3067JSON\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u6625\u306eREST\u30e2\u30c7\u30eb\u30af\u30e9\u30b9<\/h3>\n<p>\u79c1\u305f\u3061\u304c\u66f8\u304f\u7c21\u5358\u306aPOJO\u30af\u30e9\u30b9\u306f\u3001\u79c1\u305f\u3061\u306e\u30ec\u30b9\u30c8\u30d5\u30eb\u306aWeb\u30b5\u30fc\u30d3\u30b9\u30e1\u30bd\u30c3\u30c9\u306e\u5165\u529b\u3068\u51fa\u529b\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.model;\r\n\r\nimport java.io.Serializable;\r\nimport java.util.Date;\r\n\r\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;\r\nimport com.fasterxml.jackson.databind.ser.std.DateSerializer;\r\n\r\npublic class Employee implements Serializable{\r\n\r\n\tprivate static final long serialVersionUID = -7788619177798333712L;\r\n\t\r\n\tprivate int id;\r\n\tprivate String name;\r\n\tprivate Date createdDate;\r\n\t\r\n\tpublic int getId() {\r\n\t\treturn id;\r\n\t}\r\n\tpublic void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}\r\n\tpublic void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}\r\n\t\r\n\t@JsonSerialize(using=DateSerializer.class)\r\n\tpublic Date getCreatedDate() {\r\n\t\treturn createdDate;\r\n\t}\r\n\tpublic void setCreatedDate(Date createdDate) {\r\n\t\tthis.createdDate = createdDate;\r\n\t}\r\n\t\r\n\t\r\n}\r\n<\/code><\/pre>\n<p>\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u306f\u3001@JsonSerialize \u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u7528\u3067\u3001Java\u306e\u65e5\u4ed8\u3092JSON\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u305f\u3081\u306b DateSerializer \u30af\u30e9\u30b9\u3092\u4f7f\u3046\u3053\u3068\u3001\u305d\u3057\u3066\u305d\u306e\u9006\u306e\u5909\u63db\u3082\u884c\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<h3>Spring Restful web service\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8<\/h3>\n<p>\u4ee5\u4e0b\u306eREST Web\u30b5\u30fc\u30d3\u30b9\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<div>\n<div class=\"post-table\">\n<table>\n<thead>\n<tr>\n<th>Sl. No<\/th>\n<th>URI<\/th>\n<th>HTTP Method<\/th>\n<th>Details<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>\/rest\/emp\/dummy<\/td>\n<td>GET<\/td>\n<td>Health Check service, to insert a dummy data in the Employees data storage<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\/rest\/emp\/{id}<\/td>\n<td>GET<\/td>\n<td>To get the Employee object based on the id<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\/rest\/emps<\/td>\n<td>GET<\/td>\n<td>To get the list of all the Employees in the data store<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\/rest\/emp\/create<\/td>\n<td>POST<\/td>\n<td>To create the Employee object and store it<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\/rest\/emp\/delete\/{id}<\/td>\n<td>PUT<\/td>\n<td>To delete the Employee object from the data storage based on the id<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u79c1\u305f\u3061\u306b\u306f\u3001\u3053\u308c\u3089\u306eURI\u3092\u6587\u5b57\u5217\u5b9a\u6570\u3068\u3057\u3066\u5b9a\u7fa9\u3059\u308b\u30af\u30e9\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.controller;\r\n\r\npublic class EmpRestURIConstants {\r\n\r\n\tpublic static final String DUMMY_EMP = \"\/rest\/emp\/dummy\";\r\n\tpublic static final String GET_EMP = \"\/rest\/emp\/{id}\";\r\n\tpublic static final String GET_ALL_EMP = \"\/rest\/emps\";\r\n\tpublic static final String CREATE_EMP = \"\/rest\/emp\/create\";\r\n\tpublic static final String DELETE_EMP = \"\/rest\/emp\/delete\/{id}\";\r\n}\r\n<\/code><\/pre>\n<h3>Spring\u306eRestful\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9<\/h3>\n<p>\u4e0a\u8a18\u3067\u8aac\u660e\u3055\u308c\u305f\u3059\u3079\u3066\u306eWeb\u30b5\u30fc\u30d3\u30b9\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u79c1\u305f\u3061\u306eEmployeeController\u30af\u30e9\u30b9\u306b\u3088\u3063\u3066\u516c\u958b\u3055\u308c\u307e\u3059\u3002\u30af\u30e9\u30b9\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3001\u305d\u308c\u305e\u308c\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u5b66\u3073\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.controller;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.Date;\r\nimport java.util.HashMap;\r\nimport java.util.List;\r\nimport java.util.Map;\r\nimport java.util.Set;\r\n\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\nimport org.springframework.stereotype.Controller;\r\nimport org.springframework.web.bind.annotation.PathVariable;\r\nimport org.springframework.web.bind.annotation.RequestBody;\r\nimport org.springframework.web.bind.annotation.RequestMapping;\r\nimport org.springframework.web.bind.annotation.RequestMethod;\r\nimport org.springframework.web.bind.annotation.ResponseBody;\r\n\r\nimport com.scdev.spring.model.Employee;\r\n\r\n\/**\r\n * Handles requests for the Employee service.\r\n *\/\r\n@Controller\r\npublic class EmployeeController {\r\n\t\r\n\tprivate static final Logger logger = LoggerFactory.getLogger(EmployeeController.class);\r\n\t\r\n\t\/\/Map to store employees, ideally we should use database\r\n\tMap&lt;Integer, Employee&gt; empData = new HashMap&lt;Integer, Employee&gt;();\r\n\t\r\n\t@RequestMapping(value = EmpRestURIConstants.DUMMY_EMP, method = RequestMethod.GET)\r\n\tpublic @ResponseBody Employee getDummyEmployee() {\r\n\t\tlogger.info(\"Start getDummyEmployee\");\r\n\t\tEmployee emp = new Employee();\r\n\t\temp.setId(9999);\r\n\t\temp.setName(\"Dummy\");\r\n\t\temp.setCreatedDate(new Date());\r\n\t\tempData.put(9999, emp);\r\n\t\treturn emp;\r\n\t}\r\n\t\r\n\t@RequestMapping(value = EmpRestURIConstants.GET_EMP, method = RequestMethod.GET)\r\n\tpublic @ResponseBody Employee getEmployee(@PathVariable(\"id\") int empId) {\r\n\t\tlogger.info(\"Start getEmployee. ID=\"+empId);\r\n\t\t\r\n\t\treturn empData.get(empId);\r\n\t}\r\n\t\r\n\t@RequestMapping(value = EmpRestURIConstants.GET_ALL_EMP, method = RequestMethod.GET)\r\n\tpublic @ResponseBody List&lt;Employee&gt; getAllEmployees() {\r\n\t\tlogger.info(\"Start getAllEmployees.\");\r\n\t\tList&lt;Employee&gt; emps = new ArrayList&lt;Employee&gt;();\r\n\t\tSet&lt;Integer&gt; empIdKeys = empData.keySet();\r\n\t\tfor(Integer i : empIdKeys){\r\n\t\t\temps.add(empData.get(i));\r\n\t\t}\r\n\t\treturn emps;\r\n\t}\r\n\t\r\n\t@RequestMapping(value = EmpRestURIConstants.CREATE_EMP, method = RequestMethod.POST)\r\n\tpublic @ResponseBody Employee createEmployee(@RequestBody Employee emp) {\r\n\t\tlogger.info(\"Start createEmployee.\");\r\n\t\temp.setCreatedDate(new Date());\r\n\t\tempData.put(emp.getId(), emp);\r\n\t\treturn emp;\r\n\t}\r\n\t\r\n\t@RequestMapping(value = EmpRestURIConstants.DELETE_EMP, method = RequestMethod.PUT)\r\n\tpublic @ResponseBody Employee deleteEmployee(@PathVariable(\"id\") int empId) {\r\n\t\tlogger.info(\"Start deleteEmployee.\");\r\n\t\tEmployee emp = empData.get(empId);\r\n\t\tempData.remove(empId);\r\n\t\treturn emp;\r\n\t}\r\n\t\r\n}\r\n<\/code><\/pre>\n<p>\u7c21\u5358\u306e\u305f\u3081\u3001\u3059\u3079\u3066\u306e\u5f93\u696d\u54e1\u306e\u30c7\u30fc\u30bf\u3092HashMap empData\u306b\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u3002@RequestMapping\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u30ea\u30af\u30a8\u30b9\u30c8URI\u3092\u30cf\u30f3\u30c9\u30e9\u30e1\u30bd\u30c3\u30c9\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304cREST\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306b\u4f7f\u7528\u3059\u308bHTTP\u30e1\u30bd\u30c3\u30c9\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002@ResponseBody\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u5fdc\u7b54\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5fdc\u7b54\u30dc\u30c7\u30a3\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30cf\u30f3\u30c9\u30e9\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u5fdc\u7b54\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u8fd4\u3055\u308c\u308b\u3068\u3001MappingJackson2HttpMessageConverter\u304c\u5fdc\u7b54\u3092JSON\u5fdc\u7b54\u306b\u5909\u63db\u3057\u307e\u3059\u3002@PathVariable\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001REST URI\u304b\u3089\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3057\u3001\u30e1\u30bd\u30c3\u30c9\u5f15\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u7c21\u5358\u306a\u65b9\u6cd5\u3067\u3059\u3002@RequestBody\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u30dc\u30c7\u30a3\u306eJSON\u30c7\u30fc\u30bf\u3092Employee\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3082MappingJackson2HttpMessageConverter\u306b\u3088\u308b\u30de\u30c3\u30d4\u30f3\u30b0\u3067\u3059\u3002\u30b3\u30fc\u30c9\u306e\u6b8b\u308a\u306f\u5358\u7d14\u3067\u81ea\u5df1\u89e3\u660e\u3067\u3059\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30c7\u30d7\u30ed\u30a4\u3068\u30c6\u30b9\u30c8\u306e\u6e96\u5099\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002WAR\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30b3\u30f3\u30c6\u30ca\u306eWeb\u30a2\u30d7\u30ea\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3060\u3051\u3067\u3059\u3002STS\u3067\u30b5\u30fc\u30d0\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u3067\u5b9f\u884c\u3057\u3066\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u307e\u3059\u3002REST\u547c\u3073\u51fa\u3057\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306bWizTools RestClient\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u304c\u3001Chrome\u62e1\u5f35\u6a5f\u80fd\u306ePostman\u3082\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u516c\u958b\u3055\u308c\u305fREST API\u306e\u7570\u306a\u308b\u547c\u3073\u51fa\u3057\u3068\u305d\u306e\u51fa\u529b\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af &#8211; \u30c0\u30df\u30fc\u5f93\u696d\u54e1\u306e\u53d6\u5f97REST\u547c\u3073\u51fa\u3057\u3001\u5f93\u696d\u54e1\u306e\u4f5c\u6210POST REST\u547c\u3073\u51fa\u3057\uff1a\u30ea\u30af\u30a8\u30b9\u30c8\u306eContent-Type\u304c &#8220;application\/json&#8221;\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u3001HTTP\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9415\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u5f93\u696d\u54e1\u306e\u53d6\u5f97REST\u547c\u3073\u51fa\u3057\u3001\u5f93\u696d\u54e1\u306e\u524a\u9664REST\u547c\u3073\u51fa\u3057\u3001\u3059\u3079\u3066\u306e\u5f93\u696d\u54e1\u306e\u53d6\u5f97REST\u547c\u3073\u51fa\u3057<\/p>\n<h3>\u6625\u306e\u30ec\u30b9\u30c8\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0<\/h3>\n<p>Rest\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u3001\u79c1\u305f\u3061\u306eREST\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u30c6\u30b9\u30c8\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u901a\u3058\u3066REST\u30b5\u30fc\u30d3\u30b9\u3092\u547c\u3073\u51fa\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002Spring RestTemplate\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u7c21\u5358\u306b\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001RestTemplate API\u3092\u4f7f\u7528\u3057\u3066\u79c1\u305f\u3061\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eREST\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u5358\u7d14\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring;\r\n\r\nimport java.util.LinkedHashMap;\r\nimport java.util.List;\r\n\r\nimport org.springframework.web.client.RestTemplate;\r\n\r\nimport com.scdev.spring.controller.EmpRestURIConstants;\r\nimport com.scdev.spring.model.Employee;\r\n\r\npublic class TestSpringRestExample {\r\n\r\n\tpublic static final String SERVER_URI = \"https:\/\/localhost:9090\/SpringRestExample\";\r\n\t\r\n\tpublic static void main(String args[]){\r\n\t\t\r\n\t\ttestGetDummyEmployee();\r\n\t\tSystem.out.println(\"*****\");\r\n\t\ttestCreateEmployee();\r\n\t\tSystem.out.println(\"*****\");\r\n\t\ttestGetEmployee();\r\n\t\tSystem.out.println(\"*****\");\r\n\t\ttestGetAllEmployee();\r\n\t}\r\n\r\n\tprivate static void testGetAllEmployee() {\r\n\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\t\/\/we can't get List&lt;Employee&gt; because JSON convertor doesn't know the type of\r\n\t\t\/\/object in the list and hence convert it to default JSON object type LinkedHashMap\r\n\t\tList&lt;LinkedHashMap&gt; emps = restTemplate.getForObject(SERVER_URI+EmpRestURIConstants.GET_ALL_EMP, List.class);\r\n\t\tSystem.out.println(emps.size());\r\n\t\tfor(LinkedHashMap map : emps){\r\n\t\t\tSystem.out.println(\"ID=\"+map.get(\"id\")+\",Name=\"+map.get(\"name\")+\",CreatedDate=\"+map.get(\"createdDate\"));;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static void testCreateEmployee() {\r\n\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\tEmployee emp = new Employee();\r\n\t\temp.setId(1);emp.setName(\"Pankaj Kumar\");\r\n\t\tEmployee response = restTemplate.postForObject(SERVER_URI+EmpRestURIConstants.CREATE_EMP, emp, Employee.class);\r\n\t\tprintEmpData(response);\r\n\t}\r\n\r\n\tprivate static void testGetEmployee() {\r\n\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\tEmployee emp = restTemplate.getForObject(SERVER_URI+\"\/rest\/emp\/1\", Employee.class);\r\n\t\tprintEmpData(emp);\r\n\t}\r\n\r\n\tprivate static void testGetDummyEmployee() {\r\n\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\tEmployee emp = restTemplate.getForObject(SERVER_URI+EmpRestURIConstants.DUMMY_EMP, Employee.class);\r\n\t\tprintEmpData(emp);\r\n\t}\r\n\t\r\n\tpublic static void printEmpData(Employee emp){\r\n\t\tSystem.out.println(\"ID=\"+emp.getId()+\",Name=\"+emp.getName()+\",CreatedDate=\"+emp.getCreatedDate());\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u307b\u3068\u3093\u3069\u306f\u7406\u89e3\u3057\u3084\u3059\u3044\u3067\u3059\u304c\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u8fd4\u3059REST\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u969b\u306b\u306f\u3001JSON\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u969b\u306bEmployee\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u77e5\u3089\u306a\u3044\u305f\u3081\u3001LinkedHashMap\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u5909\u63db\u3057\u307e\u3059\u3002LinkedHashMap\u304b\u3089Java Bean\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u305f\u3081\u306e\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4e0a\u8a18\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>ID=9999,Name=Dummy,CreatedDate=Tue Mar 04 21:02:41 PST 2014\r\n*****\r\nID=1,Name=Pankaj Kumar,CreatedDate=Tue Mar 04 21:02:41 PST 2014\r\n*****\r\nID=1,Name=Pankaj Kumar,CreatedDate=Tue Mar 04 21:02:41 PST 2014\r\n*****\r\n2\r\nID=1,Name=Pankaj Kumar,CreatedDate=1393995761654\r\nID=9999,Name=Dummy,CreatedDate=1393995761381\r\n<\/code><\/pre>\n<p>\u3082\u3046\u4e00\u3064\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u3001RestTemplate\u306ePUT\u30e1\u30bd\u30c3\u30c9\u306b\u306f\u30ec\u30b9\u30dd\u30f3\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8a2d\u5b9a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u306a\u3044\u3053\u3068\u3067\u3059\u3002PUT\u30e1\u30bd\u30c3\u30c9\u306f\u30b5\u30fc\u30d0\u30fc\u306b\u4f55\u304b\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u3079\u304d\u3067\u3042\u308a\u3001\u5358\u7d14\u306aHTTP 200\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u3067\u5341\u5206\u3067\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ea\u30f3\u30b0\u306eRestful\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u308c\u304cSpring Restful Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u3059\u3079\u3066\u3067\u3059\u3002\u4e0a\u8a18\u306e\u30ea\u30f3\u30af\u304b\u3089\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u8a66\u3057\u3066\u307f\u3066\u3001\u3055\u3089\u306b\u5b66\u3073\u307e\u3057\u3087\u3046\u3002\u8ffd\u8a18\uff1aXML\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3001XML\u3068JSON\u306e\u4e21\u65b9\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u540c\u69d8\u306e\u4f8b\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306e\u591a\u304f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u3042\u3063\u305f\u305f\u3081\u3001\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092Spring REST XML JSON\u4f8b\u3068\u3057\u3066\u62e1\u5f35\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u4f8b\u3092\u901a\u3058\u3066\u3001Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u7f8e\u3057\u3055\u3068\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u7c21\u5358\u3055\u3092\u3054\u89a7\u3044\u305f\u3060\u304f\u3053\u3068\u3092\u5f37\u304f\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n<p>\u79c1\u305f\u3061\u306eGitHub\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5168\u4f53\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring\u306fJava EE\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e2d\u3067\u3082\u6700\u3082\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u4e00\u3064\u3067\u3059\u3002\u4ee5\u524d\u306f\u3001Spring MVC\u3092\u4f7f\u7528\u3057\u3066Java\u30d9\u30fc\u30b9\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u4eca\u65e5\u306f\u3001Spring MVC\u3092\u4f7f [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-916","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>JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"JSONJackson\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/json\u3001jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b\" \/>\n<meta property=\"og:description\" content=\"JSONJackson\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/json\u3001jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-04T20:36:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T18:31:11+00:00\" \/>\n<meta name=\"author\" content=\"\u7d50\u8863, \u6625\u82b1\" \/>\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=\"\u7d50\u8863, \u6625\u82b1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"45\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\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/\",\"name\":\"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-01-04T20:36:23+00:00\",\"dateModified\":\"2025-07-31T18:31:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac\"},\"description\":\"JSONJackson\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/e52a686063ac76fd8cc6f539d41497ac\",\"name\":\"\u7d50\u8863, \u6625\u82b1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g\",\"caption\":\"\u7d50\u8863, \u6625\u82b1\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/yuiharuka\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b - Blog - Silicon Cloud","description":"JSONJackson\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/json\u3001jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\/","og_locale":"ja_JP","og_type":"article","og_title":"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b","og_description":"JSONJackson\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/json\u3001jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-01-04T20:36:23+00:00","article_modified_time":"2025-07-31T18:31:11+00:00","author":"\u7d50\u8863, \u6625\u82b1","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u7d50\u8863, \u6625\u82b1","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"45\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/","name":"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-01-04T20:36:23+00:00","dateModified":"2025-07-31T18:31:11+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac"},"description":"JSONJackson\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"JSON\u3001Jackson\u3001\u304a\u3088\u3073\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305fSpring\u306eRestful Web\u30b5\u30fc\u30d3\u30b9\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\/e52a686063ac76fd8cc6f539d41497ac","name":"\u7d50\u8863, \u6625\u82b1","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g","caption":"\u7d50\u8863, \u6625\u82b1"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/yuiharuka\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/json%e3%80%81jackson%e3%80%81%e3%81%8a%e3%82%88%e3%81%b3%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/916","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\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=916"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/916\/revisions"}],"predecessor-version":[{"id":46612,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/916\/revisions\/46612"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}