{"id":524,"date":"2022-09-16T00:38:01","date_gmt":"2023-06-03T01:46:34","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/"},"modified":"2025-08-01T00:16:45","modified_gmt":"2025-07-31T15:16:45","slug":"%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/","title":{"rendered":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC"},"content":{"rendered":"<p>Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e2d\u3067\u3082\u3001Spring Transaction Management\u306f\u6700\u3082\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u91cd\u8981\u306a\u6a5f\u80fd\u306e\u4e00\u3064\u3067\u3059\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306f\u4f01\u696d\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u30bf\u30b9\u30af\u3067\u3059\u3002\u79c1\u305f\u3061\u306f\u65e2\u306bJDBC API\u3092\u4f7f\u7528\u3057\u3066\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u65b9\u6cd5\u3092\u5b66\u3093\u3067\u3044\u307e\u3059\u304c\u3001Spring\u306f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306b\u5e45\u5e83\u3044\u30b5\u30dd\u30fc\u30c8\u3092\u63d0\u4f9b\u3057\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u969c\u5bb3\u304c\u8d77\u304d\u305f\u5834\u5408\u3067\u3082\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027\u3092\u5fc3\u914d\u305b\u305a\u306b\u3001\u958b\u767a\u8005\u304c\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u306b\u3088\u308a\u6642\u9593\u3092\u5272\u304f\u3053\u3068\u3092\u652f\u63f4\u3057\u307e\u3059\u3002<\/p>\n<h2>\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406<\/h2>\n<p>Spring Transaction Management\u306e\u5229\u70b9\u306e\u3044\u304f\u3064\u304b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30c7\u30af\u30e9\u30e9\u30c6\u30a3\u30d6\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u30b5\u30dd\u30fc\u30c8\u3002\u3053\u306e\u30e2\u30c7\u30eb\u3067\u306f\u3001Spring\u306f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30e1\u30bd\u30c3\u30c9\u4e0a\u306bAOP\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u63a8\u5968\u3055\u308c\u308b\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3042\u308a\u3001\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3067\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>JDBC\u3001Hibernate\u3001JPA\u3001JDO\u3001JTA\u306a\u3069\u306e\u307b\u3068\u3093\u3069\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3API\u306e\u30b5\u30dd\u30fc\u30c8\u3002\u9069\u5207\u306a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u5b9f\u88c5\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3060\u3051\u3067\u3059\u3002\u305f\u3068\u3048\u3070\u3001JDBC\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306b\u306forg.springframework.jdbc.datasource.DriverManagerDataSource\u3092\u4f7f\u7528\u3057\u3001Hibernate\u3092ORM\u30c4\u30fc\u30eb\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306forg.springframework.orm.hibernate3.HibernateTransactionManager\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>TransactionTemplate\u3084PlatformTransactionManager\u306e\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3088\u308b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u30b5\u30dd\u30fc\u30c8\u3002<\/ol>\n<p>\u307b\u3068\u3093\u3069\u306e\u6a5f\u80fd\u306f\u3001\u5ba3\u8a00\u7684\u306a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u79c1\u305f\u3061\u306f\u3053\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u79c1\u305f\u3061\u306e\u4f8b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e JDBC \u306e\u4f8b<\/h2>\n<p>\u5358\u4e00\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3067\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u66f4\u65b0\u3059\u308b\u7c21\u5358\u306aSpring JDBC\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u3001\u3059\u3079\u3066\u306eJDBC\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u304c\u6b63\u5e38\u306b\u5b9f\u884c\u3055\u308c\u305f\u5834\u5408\u306b\u306e\u307f\u30b3\u30df\u30c3\u30c8\u3055\u308c\u3001\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027\u3092\u4fdd\u3064\u305f\u3081\u306b\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3057JDBC\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306b\u8a73\u3057\u3044\u5834\u5408\u3001\u63a5\u7d9a\u306b\u5bfe\u3057\u3066\u81ea\u52d5\u30b3\u30df\u30c3\u30c8\u3092false\u306b\u8a2d\u5b9a\u3057\u3066\u3001\u3059\u3079\u3066\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u7d50\u679c\u306b\u57fa\u3065\u3044\u3066\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u30b3\u30df\u30c3\u30c8\u307e\u305f\u306f\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b\u3053\u3068\u304c\u7c21\u5358\u306b\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3082\u3061\u308d\u3093\u305d\u308c\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u305f\u3081\u306e\u5927\u91cf\u306e\u3072\u306a\u5f62\u306e\u30b3\u30fc\u30c9\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u304c\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u5834\u6240\u3067\u540c\u3058\u30b3\u30fc\u30c9\u304c\u73fe\u308c\u308b\u305f\u3081\u3001\u7dca\u5bc6\u306b\u7d50\u5408\u3055\u308c\u305f\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u6027\u306e\u4f4e\u3044\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\u3002Spring\u306e\u5ba3\u8a00\u7684\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306f\u3001\u30a2\u30b9\u30da\u30af\u30c8\u6307\u5411\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u4f7f\u7528\u3057\u3066\u7de9\u3044\u7d50\u5408\u3092\u5b9f\u73fe\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5185\u306e\u3072\u306a\u5f62\u306e\u30b3\u30fc\u30c9\u3092\u56de\u907f\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u3089\u306e\u61f8\u5ff5\u306b\u5bfe\u51e6\u3057\u307e\u3059\u3002\u3067\u306f\u3001Spring\u304c\u3069\u306e\u3088\u3046\u306b\u3057\u3066\u7c21\u5358\u306a\u4f8b\u3067\u5b9f\u73fe\u3057\u3066\u3044\u308b\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002Spring\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u53d6\u308a\u639b\u304b\u308b\u524d\u306b\u3001\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>Japanese: \u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406 &#8211; \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h3>\n<p>\u79c1\u305f\u3061\u306f\u79c1\u305f\u3061\u306e\u4f7f\u7528\u306e\u305f\u3081\u306b2\u3064\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3089\u4e21\u65b9\u3092\u5358\u4e00\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3067\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>CREATE TABLE `Customer` (\r\n  `id` int(11) unsigned NOT NULL,\r\n  `name` varchar(20) DEFAULT NULL,\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>CREATE TABLE `Address` (\r\n  `id` int(11) unsigned NOT NULL,\r\n  `address` varchar(20) DEFAULT NULL,\r\n  `country` varchar(20) DEFAULT NULL,\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n<\/code><\/pre>\n<p>\u3053\u3053\u3067\u3001Address\u306eid\u5217\u304b\u3089Customer\u306eid\u5217\u3078\u306e\u5916\u90e8\u30ad\u30fc\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u30b7\u30c3\u30d7\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u30b7\u30f3\u30d7\u30eb\u3055\u306e\u305f\u3081\u306b\u5236\u7d04\u306f\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u79c1\u305f\u3061\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306fSpring\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5411\u3051\u3066\u6e96\u5099\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u306e\u3067\u3001Spring Tool Suite\u3067\u30b7\u30f3\u30d7\u30eb\u306aSpring Maven\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u6700\u7d42\u7684\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u9020\u306f\u4ee5\u4e0b\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u8981\u7d20\u3092\u4e00\u3064\u305a\u3064\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u4e00\u7dd2\u306bJDBC\u3092\u4f7f\u3063\u305f\u30b7\u30f3\u30d7\u30eb\u306aSpring\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u4f8b\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u305f\u3081\u306eMaven\u306e\u4f9d\u5b58\u95a2\u4fc2<\/h3>\n<p>JDBC API\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u306fspring-jdbc\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u542b\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001MySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306bMySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c9\u30e9\u30a4\u30d0\u3082\u5fc5\u8981\u3067\u3059\u306e\u3067\u3001mysql-connector-java\u306e\u4f9d\u5b58\u95a2\u4fc2\u3082\u542b\u3081\u307e\u3059\u3002spring-tx\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306f\u901a\u5e38\u3001STS\u306b\u3088\u3063\u3066\u81ea\u52d5\u7684\u306b\u542b\u307e\u308c\u307e\u3059\u304c\u3001\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u624b\u52d5\u3067\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30ed\u30b0\u3084\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u306e\u305f\u3081\u306e\u4ed6\u306e\u4f9d\u5b58\u95a2\u4fc2\u3082\u8868\u793a\u3055\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u4eca\u56de\u306f\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002\u6700\u7d42\u7684\u306apom.xml\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;project xmlns=\"https:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"https:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\r\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\r\n\t&lt;groupId&gt;org.springframework.samples&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;SpringJDBCTransactionManagement&lt;\/artifactId&gt;\r\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\r\n\r\n\t&lt;properties&gt;\r\n\r\n\t\t&lt;!-- Generic properties --&gt;\r\n\t\t&lt;java.version&gt;1.7&lt;\/java.version&gt;\r\n\t\t&lt;project.build.sourceEncoding&gt;UTF-8&lt;\/project.build.sourceEncoding&gt;\r\n\t\t&lt;project.reporting.outputEncoding&gt;UTF-8&lt;\/project.reporting.outputEncoding&gt;\r\n\r\n\t\t&lt;!-- Spring --&gt;\r\n\t\t&lt;spring-framework.version&gt;4.0.2.RELEASE&lt;\/spring-framework.version&gt;\r\n\r\n\t\t&lt;!-- Logging --&gt;\r\n\t\t&lt;logback.version&gt;1.0.13&lt;\/logback.version&gt;\r\n\t\t&lt;slf4j.version&gt;1.7.5&lt;\/slf4j.version&gt;\r\n\r\n\t\t&lt;!-- Test --&gt;\r\n\t\t&lt;junit.version&gt;4.11&lt;\/junit.version&gt;\r\n\r\n\t&lt;\/properties&gt;\r\n\r\n\t&lt;dependencies&gt;\r\n\t\t&lt;!-- Spring and Transactions --&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;${spring-framework.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-tx&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${spring-framework.version}&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\r\n\t\t&lt;!-- Spring JDBC and MySQL Driver --&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-jdbc&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${spring-framework.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;mysql&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;mysql-connector-java&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;5.0.5&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\r\n\t\t&lt;!-- Logging with SLF4J &amp; LogBack --&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;${slf4j.version}&lt;\/version&gt;\r\n\t\t\t&lt;scope&gt;compile&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;ch.qos.logback&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;logback-classic&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${logback.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\r\n\t\t&lt;!-- Test Artifacts --&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-test&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;${spring-framework.version}&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\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;${junit.version}&lt;\/version&gt;\r\n\t\t\t&lt;scope&gt;test&lt;\/scope&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\r\n\t&lt;\/dependencies&gt;\r\n&lt;\/project&gt;\r\n<\/code><\/pre>\n<p>\u4eca\u65e5\u306e\u6700\u65b0\u7248\u306bSpring\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002\u3042\u306a\u305f\u306eMySQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u5bfe\u5fdc\u3057\u305fMySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u30b9\u30d7\u30ea\u30f3\u30b0\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406 &#8211; \u30e2\u30c7\u30eb\u30af\u30e9\u30b9<\/h3>\n<p>\u79c1\u305f\u3061\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3055\u308c\u308b\u300cCustomer\u300d\u3068\u300cAddress\u300d\u3068\u3044\u30462\u3064\u306eJava Beans\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.jdbc.model;\r\n\r\npublic class Address {\r\n\r\n\tprivate int id;\r\n\tprivate String address;\r\n\tprivate String country;\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 getAddress() {\r\n\t\treturn address;\r\n\t}\r\n\tpublic void setAddress(String address) {\r\n\t\tthis.address = address;\r\n\t}\r\n\tpublic String getCountry() {\r\n\t\treturn country;\r\n\t}\r\n\tpublic void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}\r\n\t\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>package com.scdev.spring.jdbc.model;\r\n\r\npublic class Customer {\r\n\r\n\tprivate int id;\r\n\tprivate String name;\r\n\tprivate Address address;\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\tpublic Address getAddress() {\r\n\t\treturn address;\r\n\t}\r\n\tpublic void setAddress(Address address) {\r\n\t\tthis.address = address;\r\n\t}\r\n\t\r\n}\r\n<\/code><\/pre>\n<p>\u300cCustomer\u300dBean\u306b\u306f\u3001\u300cAddress\u300d\u304c\u5909\u6570\u306e1\u3064\u3068\u3057\u3066\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u3065\u3044\u3066\u304f\u3060\u3055\u3044\u3002Customer\u306e\u305f\u3081\u306eDAO\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u3001Customer\u3068Address\u306e\u4e21\u65b9\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u3053\u308c\u3089\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u305f\u3081\u306b2\u3064\u306e\u5225\u3005\u306e\u633f\u5165\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c7\u30fc\u30bf\u306e\u4e0d\u6574\u5408\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h3>\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406 &#8211; DAO\u306e\u5b9f\u88c5<\/h3>\n<p>\u5358\u7d14\u5316\u306e\u305f\u3081\u3001\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u3068\u4f4f\u6240\u30c6\u30fc\u30d6\u30eb\u306e\u4e21\u65b9\u306b\u30ec\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3059\u308b\u305f\u3081\u306eDAO\uff08\u30c7\u30fc\u30bf\u30a2\u30af\u30bb\u30b9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u3092\u9867\u5ba2\u306e\u30d3\u30fc\u30f3\u306b\u5b9f\u88c5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.jdbc.dao;\r\n\r\nimport com.scdev.spring.jdbc.model.Customer;\r\n\r\npublic interface CustomerDAO {\r\n\r\n\tpublic void create(Customer customer);\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>package com.scdev.spring.jdbc.dao;\r\n\r\nimport javax.sql.DataSource;\r\n\r\nimport org.springframework.jdbc.core.JdbcTemplate;\r\n\r\nimport com.scdev.spring.jdbc.model.Customer;\r\n\r\npublic class CustomerDAOImpl implements CustomerDAO {\r\n\r\n\tprivate DataSource dataSource;\r\n\r\n\tpublic void setDataSource(DataSource dataSource) {\r\n\t\tthis.dataSource = dataSource;\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void create(Customer customer) {\r\n\t\tString queryCustomer = \"insert into Customer (id, name) values (?,?)\";\r\n\t\tString queryAddress = \"insert into Address (id, address,country) values (?,?,?)\";\r\n\r\n\t\tJdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);\r\n\r\n\t\tjdbcTemplate.update(queryCustomer, new Object[] { customer.getId(),\r\n\t\t\t\tcustomer.getName() });\r\n\t\tSystem.out.println(\"Inserted into Customer Table Successfully\");\r\n\t\tjdbcTemplate.update(queryAddress, new Object[] { customer.getId(),\r\n\t\t\t\tcustomer.getAddress().getAddress(),\r\n\t\t\t\tcustomer.getAddress().getCountry() });\r\n\t\tSystem.out.println(\"Inserted into Address Table Successfully\");\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u300cCustomerDAO\u306e\u5b9f\u88c5\u3067\u306f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u304c\u9069\u5207\u306b\u884c\u308f\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3053\u306e\u65b9\u6cd5\u306b\u3088\u3063\u3066\u3001\u95a2\u5fc3\u306e\u5206\u96e2\u3092\u5b9f\u73fe\u3057\u3066\u3044\u307e\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u6642\u306b\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u304b\u3089DAO\u306e\u5b9f\u88c5\u3092\u53d7\u3051\u53d6\u308a\u3001\u3053\u308c\u3089\u306e\u30af\u30e9\u30b9\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u300d<\/p>\n<h3>\u300cSpring\u306e\u5ba3\u8a00\u7684\u306a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406 &#8211; \u30b5\u30fc\u30d3\u30b9\u300d<\/h3>\n<p>\u300c\u9867\u5ba2DAO\u306e\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u3001\u9867\u5ba2\u3068\u4f4f\u6240\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u30ec\u30b3\u30fc\u30c9\u3092\u633f\u5165\u3059\u308b\u969b\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u3092\u63d0\u4f9b\u3059\u308b\u9867\u5ba2\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u300d<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.jdbc.service;\r\n\r\nimport com.scdev.spring.jdbc.model.Customer;\r\n\r\npublic interface CustomerManager {\r\n\r\n\tpublic void createCustomer(Customer cust);\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>package com.scdev.spring.jdbc.service;\r\n\r\nimport org.springframework.transaction.annotation.Transactional;\r\n\r\nimport com.scdev.spring.jdbc.dao.CustomerDAO;\r\nimport com.scdev.spring.jdbc.model.Customer;\r\n\r\npublic class CustomerManagerImpl implements CustomerManager {\r\n\r\n\tprivate CustomerDAO customerDAO;\r\n\r\n\tpublic void setCustomerDAO(CustomerDAO customerDAO) {\r\n\t\tthis.customerDAO = customerDAO;\r\n\t}\r\n\r\n\t@Override\r\n\t@Transactional\r\n\tpublic void createCustomer(Customer cust) {\r\n\t\tcustomerDAO.create(cust);\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u3082\u3057CustomerManager\u306e\u5b9f\u88c5\u306b\u6ce8\u76ee\u3059\u308b\u3068\u3001\u305d\u308c\u306fCustomerDAO\u306e\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u3066\u9867\u5ba2\u3092\u4f5c\u6210\u3059\u308b\u3060\u3051\u3067\u3059\u304c\u3001createCustomer()\u30e1\u30bd\u30c3\u30c9\u306b@Transactional\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u308b\u3053\u3068\u3067\u5ba3\u8a00\u7684\u306a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3060\u3051\u3067Spring\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u5229\u70b9\u3092\u5f97\u308b\u305f\u3081\u306b\u79c1\u305f\u3061\u304c\u30b3\u30fc\u30c9\u3067\u884c\u3046\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u3067\u3059\u3002@Transactional\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u30e1\u30bd\u30c3\u30c9\u3060\u3051\u3067\u306a\u304f\u30af\u30e9\u30b9\u5168\u4f53\u306b\u3082\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3059\u3079\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u6a5f\u80fd\u3092\u6301\u305f\u305b\u305f\u3044\u5834\u5408\u306f\u3001\u3053\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u30af\u30e9\u30b9\u306b\u4ed8\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002Spring\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u4f8b\u3092\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u306f\u3001Spring\u306e\u30d3\u30fc\u30f3\u3092\u30ef\u30a4\u30e4\u30ea\u30f3\u30b0\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<h3>\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406 &#8211; \u30d3\u30fc\u30f3\u306e\u8a2d\u5b9a<\/h3>\n<p>\u300cspring.xml\u300d\u3068\u3044\u3046\u540d\u524d\u306eSpring Bean\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u7528\u3057\u3066\u3001Spring Bean\u3092\u63a5\u7d9a\u3057\u3001JDBC\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3066\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u3092\u30c6\u30b9\u30c8\u3057\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\" xmlns:context=\"https:\/\/www.springframework.org\/schema\/context\"\r\n\txmlns:tx=\"https:\/\/www.springframework.org\/schema\/tx\"\r\n\txsi:schemaLocation=\"https:\/\/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-4.0.xsd\r\n\t\thttps:\/\/www.springframework.org\/schema\/tx https:\/\/www.springframework.org\/schema\/tx\/spring-tx-4.0.xsd\"&gt;\r\n\r\n\t&lt;!-- Enable Annotation based Declarative Transaction Management --&gt;\r\n\t&lt;tx:annotation-driven proxy-target-class=\"true\"\r\n\t\ttransaction-manager=\"transactionManager\" \/&gt;\r\n\r\n\t&lt;!-- Creating TransactionManager Bean, since JDBC we are creating of type \r\n\t\tDataSourceTransactionManager --&gt;\r\n\t&lt;bean id=\"transactionManager\"\r\n\t\tclass=\"org.springframework.jdbc.datasource.DataSourceTransactionManager\"&gt;\r\n\t\t&lt;property name=\"dataSource\" ref=\"dataSource\" \/&gt;\r\n\t&lt;\/bean&gt;\r\n\t\r\n\t&lt;!-- MySQL DB DataSource --&gt;\r\n\t&lt;bean id=\"dataSource\"\r\n\t\tclass=\"org.springframework.jdbc.datasource.DriverManagerDataSource\"&gt;\r\n\r\n\t\t&lt;property name=\"driverClassName\" value=\"com.mysql.jdbc.Driver\" \/&gt;\r\n\t\t&lt;property name=\"url\" value=\"jdbc:mysql:\/\/localhost:3306\/TestDB\" \/&gt;\r\n\t\t&lt;property name=\"username\" value=\"scdev\" \/&gt;\r\n\t\t&lt;property name=\"password\" value=\"scdev123\" \/&gt;\r\n\t&lt;\/bean&gt;\r\n\r\n\t&lt;bean id=\"customerDAO\" class=\"com.scdev.spring.jdbc.dao.CustomerDAOImpl\"&gt;\r\n\t\t&lt;property name=\"dataSource\" ref=\"dataSource\"&gt;&lt;\/property&gt;\r\n\t&lt;\/bean&gt;\r\n\r\n\t&lt;bean id=\"customerManager\" class=\"com.scdev.spring.jdbc.service.CustomerManagerImpl\"&gt;\r\n\t\t&lt;property name=\"customerDAO\" ref=\"customerDAO\"&gt;&lt;\/property&gt;\r\n\t&lt;\/bean&gt;\r\n\r\n&lt;\/beans&gt;\r\n<\/code><\/pre>\n<p>\u6625\u306e\u30d3\u30fc\u30f3\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u6ce8\u610f\u3059\u3079\u304d\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n<ul class=\"post-ul\">\n<li>tx:annotation-driven element is used to tell Spring context that we are using annotation based transaction management configuration. transaction-manager attribute is used to provide the transaction manager bean name. transaction-manager default value is transactionManager but I am still having it to avoid confusion. proxy-target-class attribute is used to tell Spring context to use class based proxies, without it you will get runtime exception with message such as Exception in thread \u201cmain\u201d org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named \u2018customerManager\u2019 must be of type [com.scdev.spring.jdbc.service.CustomerManagerImpl], but was actually of type [com.sun.proxy.$Proxy6]<\/li>\n<li>Since we are using JDBC, we are creating transactionManager bean of type org.springframework.jdbc.datasource.DataSourceTransactionManager. This is very important and we should use proper transaction manager implementation class based on our transaction API use.<\/li>\n<li>dataSource bean is used to create the DataSource object and we are required to provide the database configuration properties such as driverClassName, url, username and password. Change these values based on your local settings.<\/li>\n<li>We are injecting dataSource into customerDAO bean. Similarly we are injecting customerDAO bean into customerManager bean definition.<\/li>\n<\/ul>\n<p>\u79c1\u305f\u3061\u306e\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u5b9f\u88c5\u3092\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306b\u5358\u7d14\u306a\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.spring.jdbc.main;\r\n\r\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\r\n\r\nimport com.scdev.spring.jdbc.model.Address;\r\nimport com.scdev.spring.jdbc.model.Customer;\r\nimport com.scdev.spring.jdbc.service.CustomerManager;\r\nimport com.scdev.spring.jdbc.service.CustomerManagerImpl;\r\n\r\npublic class TransactionManagerMain {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(\r\n\t\t\t\t\"spring.xml\");\r\n\r\n\t\tCustomerManager customerManager = ctx.getBean(\"customerManager\",\r\n\t\t\t\tCustomerManagerImpl.class);\r\n\r\n\t\tCustomer cust = createDummyCustomer();\r\n\t\tcustomerManager.createCustomer(cust);\r\n\r\n\t\tctx.close();\r\n\t}\r\n\r\n\tprivate static Customer createDummyCustomer() {\r\n\t\tCustomer customer = new Customer();\r\n\t\tcustomer.setId(2);\r\n\t\tcustomer.setName(\"Pankaj\");\r\n\t\tAddress address = new Address();\r\n\t\taddress.setId(2);\r\n\t\taddress.setCountry(\"India\");\r\n\t\t\/\/ setting value more than 20 chars, so that SQLException occurs\r\n\t\taddress.setAddress(\"Albany Dr, San Jose, CA 95129\");\r\n\t\tcustomer.setAddress(address);\r\n\t\treturn customer;\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u6b21\u306e\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f4f\u6240\u306e\u5217\u306e\u5024\u3092\u610f\u56f3\u7684\u306b\u9577\u304f\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u4f4f\u6240\u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u633f\u5165\u3059\u308b\u969b\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u6b21\u306e\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>Mar 29, 2014 7:59:32 PM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh\r\nINFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@3fa99295: startup date [Sat Mar 29 19:59:32 PDT 2014]; root of context hierarchy\r\nMar 29, 2014 7:59:32 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions\r\nINFO: Loading XML bean definitions from class path resource [spring.xml]\r\nMar 29, 2014 7:59:32 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName\r\nINFO: Loaded JDBC driver: com.mysql.jdbc.Driver\r\nInserted into Customer Table Successfully\r\nMar 29, 2014 7:59:32 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions\r\nINFO: Loading XML bean definitions from class path resource [org\/springframework\/jdbc\/support\/sql-error-codes.xml]\r\nMar 29, 2014 7:59:32 PM org.springframework.jdbc.support.SQLErrorCodesFactory &lt;init&gt;\r\nINFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]\r\nException in thread \"main\" org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into Address (id, address,country) values (?,?,?)]; Data truncation: Data too long for column 'address' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'address' at row 1\r\n\tat org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100)\r\n\tat org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)\r\n\tat org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)\r\n\tat org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)\r\n\tat org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)\r\n\tat org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:907)\r\n\tat org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:968)\r\n\tat org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:978)\r\n\tat com.scdev.spring.jdbc.dao.CustomerDAOImpl.create(CustomerDAOImpl.java:27)\r\n\tat com.scdev.spring.jdbc.service.CustomerManagerImpl.createCustomer(CustomerManagerImpl.java:19)\r\n\tat com.scdev.spring.jdbc.service.CustomerManagerImpl$$FastClassBySpringCGLIB$$84f71441.invoke(&lt;generated&gt;)\r\n\tat org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\r\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:711)\r\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)\r\n\tat org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)\r\n\tat org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)\r\n\tat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)\r\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)\r\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)\r\n\tat com.scdev.spring.jdbc.service.CustomerManagerImpl$$EnhancerBySpringCGLIB$$891ec7ac.createCustomer(&lt;generated&gt;)\r\n\tat com.scdev.spring.jdbc.main.TransactionManagerMain.main(TransactionManagerMain.java:20)\r\nCaused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'address' at row 1\r\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2939)\r\n\tat com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)\r\n\tat com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)\r\n\tat com.mysql.jdbc.Connection.execSQL(Connection.java:3249)\r\n\tat com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)\r\n\tat com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1541)\r\n\tat com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455)\r\n\tat com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440)\r\n\tat org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:914)\r\n\tat org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:907)\r\n\tat org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:642)\r\n\t... 16 more\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u30d5\u30ec\u30fc\u30ba\u3092\u65e5\u672c\u8a9e\u3067\u540c\u610f\u8868\u73fe\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff11\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u7d50\u69cb\u3067\u3059\u3002<\/p>\n<p>\u30ed\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u3088\u308c\u3070\u3001\u30c7\u30fc\u30bf\u304c\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u306b\u6b63\u5e38\u306b\u633f\u5165\u3055\u308c\u307e\u3057\u305f\u304c\u3001MySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c9\u30e9\u30a4\u30d0\u306b\u3088\u3063\u3066\u660e\u78ba\u306b\u4f4f\u6240\u306e\u5217\u304c\u9577\u3059\u304e\u308b\u3068\u3044\u3046\u4f8b\u5916\u304c\u767a\u751f\u3057\u3066\u3044\u307e\u3059\u3002\u4eca\u3001Customer\u30c6\u30fc\u30d6\u30eb\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u305d\u3053\u306b\u306f\u4f55\u306e\u884c\u3082\u3042\u308a\u307e\u305b\u3093\u3002\u3064\u307e\u308a\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u5b8c\u5168\u306b\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u4ed5\u7d44\u307f\u304c\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u7591\u554f\u3067\u3042\u308c\u3070\u3001\u30ed\u30b0\u3092\u6ce8\u610f\u6df1\u304f\u898b\u3066\u3001Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u3088\u3063\u3066\u4f5c\u6210\u3055\u308c\u305fAOP\u3068Proxy\u30af\u30e9\u30b9\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306fAround advice\u3092\u4f7f\u7528\u3057\u3066CustomerManagerImpl\u306e\u30d7\u30ed\u30ad\u30b7\u30af\u30e9\u30b9\u3092\u751f\u6210\u3057\u3001\u30e1\u30bd\u30c3\u30c9\u304c\u6b63\u5e38\u306b\u8fd4\u3055\u308c\u305f\u5834\u5408\u306b\u306e\u307f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u30b3\u30df\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\u4f8b\u5916\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u5168\u4f53\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3057\u307e\u3059\u3002\u3088\u308a\u591a\u304f\u306e\u60c5\u5831\u3092\u5b66\u3076\u305f\u3081\u306b\u306f\u3001Spring AOP\u306e\u4f8b\u3092\u8aad\u3080\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\u3053\u308c\u3067Spring\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306e\u4f8b\u306f\u4ee5\u4e0a\u3067\u3059\u3002\u4ee5\u4e0b\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\u3082\u3063\u3068\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30b9\u30d7\u30ea\u30f3\u30b0 JDBC \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e2d\u3067\u3082\u3001Spring Transaction Management\u306f\u6700\u3082\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u91cd\u8981\u306a\u6a5f\u80fd\u306e\u4e00\u3064\u3067\u3059\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306f\u4f01\u696d\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u30bf\u30b9\u30af\u3067\u3059\u3002\u79c1\u305f\u3061\u306f\u65e2\u306b [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-524","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>\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\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\/\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b-jdbc\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\" \/>\n<meta property=\"og:description\" content=\"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\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\/\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b-jdbc\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-03T01:46:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T15:16:45+00:00\" \/>\n<meta name=\"author\" content=\"\u6d77\u6597, \u8475\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6d77\u6597, \u8475\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"44\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\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/\",\"name\":\"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-06-03T01:46:34+00:00\",\"dateModified\":\"2025-07-31T15:16:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\"},\"description\":\"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\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\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\",\"name\":\"\u6d77\u6597, \u8475\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"caption\":\"\u6d77\u6597, \u8475\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC - Blog - Silicon Cloud","description":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\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\/\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b-jdbc\/","og_locale":"ja_JP","og_type":"article","og_title":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC","og_description":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\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\/\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b-jdbc\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-03T01:46:34+00:00","article_modified_time":"2025-07-31T15:16:45+00:00","author":"\u6d77\u6597, \u8475","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u6d77\u6597, \u8475","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"44\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/","name":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-06-03T01:46:34+00:00","dateModified":"2025-07-31T15:16:45+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6"},"description":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC\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\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6625\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u4f8b JDBC"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6","name":"\u6d77\u6597, \u8475","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","caption":"\u6d77\u6597, \u8475"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e6%98%a5%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e7%ae%a1%e7%90%86%e4%be%8b-jdbc\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"predecessor-version":[{"id":41719,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/524\/revisions\/41719"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}