{"id":121,"date":"2017-10-14T16:41:39","date_gmt":"2017-10-14T07:41:39","guid":{"rendered":"http:\/\/ito-u-oti.com\/?p=121"},"modified":"2018-05-05T19:28:01","modified_gmt":"2018-05-05T10:28:01","slug":"post-121","status":"publish","type":"post","link":"https:\/\/ito-u-oti.com\/?p=121","title":{"rendered":"Spring Framework\u306eUnit\u30c6\u30b9\u30c8\u5b9f\u88c5\u65b9\u6cd5\u30001-7.Repository\u30c6\u30b9\u30c8(Junit4, spring-test, DBSetup)"},"content":{"rendered":"<h2 id=\"outline__1\">Spring Framework\u306eUnit\u30c6\u30b9\u30c8\u5b9f\u88c5\u65b9\u6cd5\u30001-7.Repository\u30c6\u30b9\u30c8(Junit4, spring-test, DBSetup)<\/h2>\n<div class=\"pointBox\">\u3010\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u3011<br \/>\n<a href=\"http:\/\/terasolunaorg.github.io\/guideline\/5.3.0.RELEASE\/ja\/index.html\">TERASOLUNA Server Framework for Java (5.x) Development Guideline<\/a><br \/>\n<a href=\"http:\/\/terasolunaorg.github.io\/guideline\/5.3.0.RELEASE\/ja\/Tutorial\/TutorialTodo.html\">\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u306f\u3053\u3061\u3089<\/a><br \/>\n\uff08\u3053\u308c\u306eMyBatis3\u3092\u4f7f\u7528\u3057\u305f\u30d1\u30bf\u30fc\u30f3\u3067\u4f5c\u6210\u3057\u3066\u307e\u3059\u3002\uff09<\/div>\n<h2 id=\"outline__2\">1-7.Repository\u30c6\u30b9\u30c8\u3000Junit4,Spring-test,DBSetup\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u305f\u30d1\u30bf\u30fc\u30f3<\/h2>\n<p>DBSetup\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u305d\u306e\u540d\u306e\u901a\u308a\u3001\u30c6\u30b9\u30c8\u6642\u306b\u30c7\u30fc\u30bf\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<br \/>\nDBUnit\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u3068\u6bd4\u8f03\u3059\u308b\u3068\u3001\u30e1\u30ea\u30c3\u30c8\u306f<br \/>\n\u30fbJava\u30d5\u30a1\u30a4\u30eb\u3067\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u30c7\u30fc\u30bf\u306e\u8a18\u8ff0\u304c\u3067\u304d\u308b\u306e\u3067\u3001xml\u30d5\u30a1\u30a4\u30eb\u304c\u4e0d\u8981\u306b\u306a\u308b\u3002<br \/>\n\u30fb\u540c\u3058\u30c7\u30fc\u30bf\u306e\u7e70\u308a\u8fd4\u3057\u3066\u3044\u308f\u3086\u308b\u30c7\u30fc\u30bf\u3092\u300c\u81a8\u3089\u307e\u3059\u300d\u5834\u5408\u3001\u81a8\u3089\u307e\u305b\u308b\u30c7\u30fc\u30bf\u306e\u500b\u6570\u3084\u8a2d\u5b9a\u3092\u5236\u5fa1\u3067\u304d\u308b\u306e\u3067xml\u30d5\u30a1\u30a4\u30eb\u306b\u540c\u3058\u30c7\u30fc\u30bf\u3092\u30b3\u30d4\u30da\u3057\u306a\u304f\u3066\u6e08\u3080\u304b\u3089\u697d\u3002<br \/>\n\u30fb\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u3057\u76f4\u3059\u304b\u3069\u3046\u304b\u306e\u5236\u5fa1\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u6e08\u307f\u305d\u306e\u5206\u52d5\u4f5c\u304c\u8efd\u304f\u306a\u308b\u3002<br \/>\n\u306a\u3069\u304c\u6319\u3052\u3089\u308c\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\uff1f<\/p>\n<p>\u4e00\u65b9\u3067\u3001\u30c7\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u306f<br \/>\n\u30fb\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u306e\u3067\u3001DBunit\u3067\u3044\u3046\u3068\u3053\u308d\u306e@ExpectedDatabase\u3068\u3044\u3063\u305f\u691c\u8a3c\u7528\u306e\u6a5f\u80fd\u306f\u7121\u3044\uff08\u8abf\u3079\u305f\u3089\u3042\u308b\u304b\u3082\u3067\u3059\u304c\u3002\uff09<br \/>\n\u30fbDBunit\u3068\u6bd4\u3079\u3066\u4f7f\u3063\u3066\u3044\u308b\u4eba\u304c\u5c11\u306a\u76ee<br \/>\n\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u304b\u3082\u3002<\/p>\n<h3 id=\"outline__2_1\">\u3010pom.xml\u3011<\/h3>\n<p>DBSetup\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;dependencies&gt;\r\n    &lt;dependency&gt;\r\n        &lt;groupId&gt;junit&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;junit&lt;\/artifactId&gt;\r\n        &lt;scope&gt;test&lt;\/scope&gt;\r\n    &lt;\/dependency&gt;\r\n\r\n    &lt;dependency&gt;\r\n        &lt;groupId&gt;org.springframework&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;spring-test&lt;\/artifactId&gt;\r\n        &lt;scope&gt;test&lt;\/scope&gt;\r\n    &lt;\/dependency&gt;\r\n\r\n    &lt;dependency&gt;\r\n        &lt;groupId&gt;com.ninja-squad&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;DbSetup&lt;\/artifactId&gt;\r\n        &lt;version&gt;2.1.0&lt;\/version&gt;\r\n        &lt;scope&gt;test&lt;\/scope&gt;\r\n   &lt;\/dependency&gt;\r\n&lt;\/dependencies&gt;\r\n<\/pre>\n<h3 id=\"outline__2_2\">\u3010\u30c6\u30b9\u30c8\u5bfe\u8c61\u30af\u30e9\u30b9\u3011<\/h3>\n<p>TodoRepository.java<br \/>\n\u30c6\u30b9\u30c8\u5bfe\u8c61\u306fupdate\u30e1\u30bd\u30c3\u30c9<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npublic interface TodoRepository {\r\n   Todo findOne(String todoId);\r\n\r\n    Collection&lt;Todo&gt; findAll();\r\n\r\n    void create(Todo todo);\r\n\r\n    boolean update(Todo todo);\r\n\r\n    void delete(Todo todo);\r\n\r\n    long countByFinished(boolean finished);\r\n}\r\n<\/pre>\n<h3 id=\"outline__2_3\">\u3010\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u3011<\/h3>\n<p>TodoRepositoryTestVerDBsetup.java<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@RunWith(SpringJUnit4ClassRunner.class)\r\n@ContextConfiguration(locations = {&quot;classpath:META-INF\/spring\/test-context.xml&quot;})\r\n@Transactional\r\npublic class TodoRepositoryTestVerDBsetup {\r\n\r\n    @Inject\r\n    TodoRepository target;\r\n    \r\n    @Inject\r\n    DataSource dataSource;\r\n    \r\n    @Inject\r\n    JdbcTemplate jdbctemplate;\r\n    \r\n    private static DbSetupTracker TRACKER = new DbSetupTracker();\r\n    \r\n    @Before\r\n    public void setUp() {\r\n        \/\/DBSetup\u3092\u4f7f\u3046\u6e96\u5099\r\n        Destination dest = new DataSourceDestination(dataSource);\r\n        \/\/sequenceOf\u30e1\u30bd\u30c3\u30c9\u3067\u56f2\u3080\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u9023\u7d9a\u3057\u3066\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3067\u304d\u308b\u3002\r\n        Operation ops = Operations.sequenceOf(DbsetupOperations.INIT_TABLE,\r\n                                                DbsetupOperations.SETUP_TABLE_A);\r\n        DbSetup dbSetup = new DbSetup(dest, ops);\r\n        \r\n        \/\/TRACKER\u3067\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u5236\u5fa1\u3059\u308b\u3002\r\n        TRACKER.launchIfNecessary(dbSetup);\r\n    }\r\n    \r\n    @Test\r\n    public void testUpdate() throws Exception{\r\n        \/\/\u30c6\u30b9\u30c8\u7528\u306e\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\uff08getTodoData\u30e1\u30bd\u30c3\u30c9\u306fDB\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308bprivate\u30e1\u30bd\u30c3\u30c9\u3002\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u63db\u3048\u3066\u66f4\u65b0\u3059\u308b\u3002\uff09\r\n        SimpleDateFormat sdFormat = new SimpleDateFormat(&quot;yyyy-MM-dd HH:mm:ss.SSS&quot;);\r\n        String todoId = &quot;cceae402-c5b1-440f-bae2-7bee19dc17fb&quot;;\r\n        Todo testDataTodo = getTodoData(todoId);\r\n        testDataTodo.setFinished(true);\r\n        \r\n        \/\/update\u30e1\u30bd\u30c3\u30c9\u306e\u30c6\u30b9\u30c8\r\n        boolean actTodo = target.update(testDataTodo);\r\n        \r\n        \/\/\u7d50\u679c\u691c\u8a3c\r\n        assertEquals(actTodo, true);\r\n        \r\n        \/\/\u671f\u5f85\u5024\u306e\u4f5c\u6210\r\n        Todo exptodo = new Todo();\r\n        exptodo.setTodoId(&quot;cceae402-c5b1-440f-bae2-7bee19dc17fb&quot;);\r\n        exptodo.setTodoTitle(&quot;one&quot;);\r\n        exptodo.setFinished(true);\r\n        String strDate = &quot;2017-10-01 15:39:17.888&quot;;\r\n        Date date = sdFormat.parse(strDate);\r\n        exptodo.setCreatedAt(date);\r\n        \r\n        \/\/\u51e6\u7406\u5f8c\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\uff08getTodoData\u30e1\u30bd\u30c3\u30c9\u306fDB\u304b\u3089\u30c6\u30b9\u30c8\u5f8c\u306b\u5909\u66f4\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308bprivate\u30e1\u30bd\u30c3\u30c9\uff09\r\n        Todo actTestDataTodo = getTodoData(todoId);\r\n        \r\n        \/\/\u30e1\u30bd\u30c3\u30c9\u5b9f\u884c\u5f8c\u30c6\u30fc\u30d6\u30eb\u30c7\u30fc\u30bf\u691c\u8a3c\r\n        \/\/date\u578b\u306e\u8868\u793a\u5f62\u5f0f\u304c\u7570\u306a\u308b\u305f\u3081\u3001\u6642\u523b\u6587\u5b57\u5217\u306b\u5909\u63db\u3057\u3066\u6bd4\u8f03\u3057\u3066\u3044\u308b\r\n        assertEquals(exptodo.getTodoId(), actTestDataTodo.getTodoId());\r\n        assertEquals(exptodo.getTodoTitle(), actTestDataTodo.getTodoTitle());\r\n        assertEquals(exptodo.isFinished(), actTestDataTodo.isFinished());\r\n        assertEquals(sdFormat.format(exptodo.getCreatedAt()) ,sdFormat.format(actTestDataTodo.getCreatedAt()));\r\n        \r\n        \/*\r\n         * TRACKER\u306b\u3088\u308b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u5236\u5fa1\r\n         * \u30c6\u30b9\u30c8\u5bfe\u8c61\u304c\u53c2\u7167\u7cfb\uff08select\uff09\u306e\u5834\u5408\u30fb\u30fb\u30fb\u53c2\u7167\u306e\u307f\u3067\u3042\u308a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30c7\u30fc\u30bf\u306e\u518d\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u4e0d\u8981\u3002\r\n         * \u30c6\u30b9\u30c8\u5bfe\u8c61\u304c\u66f4\u65b0\u7cfb(insert, update, delete\uff09\u306e\u5834\u5408\u30fb\u30fb\u30fb\u66f4\u65b0\u3055\u308c\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u307e\u307e\u3060\u3068\u6b21\u306e\u30c6\u30b9\u30c8\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u306e\u3067\u3001\u30c7\u30fc\u30bf\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u3057\u76f4\u3059\u5fc5\u8981\u304c\u3042\u308b\u3002\r\n         * TRACKER.skipNextLaunch\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u6b21\u306e\u30c6\u30b9\u30c8\uff08@Test\uff09\u306e\u524d\u306b\u5b9f\u884c\u3055\u308c\u308b@Before\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\r\n         * \r\n         * \u4eca\u56de\u306fupdate\u30e1\u30bd\u30c3\u30c9\u304c\u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u305f\u3081\u3001TRACKER.skipNextLaunch();\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u308b\u3002\r\n         *\/\r\n        \/\/TRACKER.skipNextLaunch();\r\n        \r\n    }\r\n}\r\n<\/pre>\n<p>\u30b3\u30e1\u30f3\u30c8\u306b\u3082\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u304c\u3001DBSetup\u306e\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u306f\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u5236\u5fa1\u3092TRACKER\u3067\u884c\u3063\u3066\u3044\u308b\u70b9\u3067\u3059\u3002<br \/>\nDBSetup\u3092\u4f7f\u3046\u4e0a\u3067\u5fc5\u9808\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u5236\u5fa1\u306b\u3088\u3063\u3066\u4e0d\u5fc5\u8981\u306a\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u66f4\u65b0\u7cfb\u306e\u51e6\u7406\u306e\u6642\u306b\u306e\u307f\u30c7\u30fc\u30bf\u306e\u518d\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u884c\u3063\u3066\u7dba\u9e97\u306a\u72b6\u614b\u3067\u59cb\u3081\u308b\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>DbsetupOperations.java<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npublic class DbsetupOperations {\r\n    \r\n    \/*\r\n     * \u30c6\u30fc\u30d6\u30eb\u30c7\u30fc\u30bf\u3092\u521d\u671f\u5316\u3059\u308b\u30e1\u30bd\u30c3\u30c9\r\n     *\/\r\n    public static final Operation INIT_TABLE =\r\n            Operations.sequenceOf(\r\n                    Operations.deleteAllFrom(&quot;todo&quot;));\r\n    \r\n    \/*\r\n     * \u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u30e1\u30bd\u30c3\u30c9\uff08\u30d1\u30bf\u30fc\u30f3\uff21\uff09\r\n     *\/\r\n    public static final Operation SETUP_TABLE_A =\r\n            Operations.sequenceOf(\r\n                    Operations.insertInto(&quot;todo&quot;)\r\n                        .columns(&quot;todo_id&quot;,&quot;todo_title&quot;,&quot;finished&quot;,&quot;created_at&quot;)\r\n                        .values(&quot;cceae402-c5b1-440f-bae2-7bee19dc17fb&quot;,&quot;one&quot;,false,&quot;2017-10-01 15:39:17.888&quot;)\r\n                        .values(&quot;5dd4ba78-ff5b-423b-aa2a-a07118aeaf90&quot;,&quot;two&quot;,false,&quot;2017-10-01 15:39:19.981&quot;)\r\n                        .values(&quot;e3bdb9af-3dde-40b7-b5fb-4b388567ab45&quot;,&quot;three&quot;,false,&quot;2017-10-01 15:39:28.437&quot;)\r\n                        .build()\r\n            );\r\n    \r\n    \/*\r\n     * \u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u30e1\u30bd\u30c3\u30c9\uff08\u30d1\u30bf\u30fc\u30f3\uff22\uff09\r\n     * \u30d1\u30bf\u30fc\u30f3\uff21\u3068\u306e\u9055\u3044\u306f1\u884c\u305a\u3064\u30ab\u30e9\u30e0\u306b\u5bfe\u3057\u3066\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u70b9\u3002\r\n     *\/\r\n    public static final Operation SETUP_TABLE_B =\r\n            Operations.sequenceOf(\r\n                    Operations.insertInto(&quot;todo&quot;)\r\n                    \/\/row0\r\n                    .row()\r\n                        .column(&quot;todo_id&quot;, &quot;cceae402-c5b1-440f-bae2-7bee19dc17fb&quot;)\r\n                        .column(&quot;todo_title&quot;, &quot;one&quot;)\r\n                        .column(&quot;finished&quot;, false)\r\n                        .column(&quot;created_at&quot;, &quot;2017-10-01 15:39:17.888&quot;)\r\n                        .end()\r\n                    \/\/row1\r\n                    .row()\r\n                        .column(&quot;todo_id&quot;, &quot;5dd4ba78-ff5b-423b-aa2a-a07118aeaf90&quot;)\r\n                        .column(&quot;todo_title&quot;, &quot;two&quot;)\r\n                        .column(&quot;finished&quot;, false)\r\n                        .column(&quot;created_at&quot;, &quot;2017-10-01 15:39:19.981&quot;)\r\n                        .end()\r\n                    \/\/row2\r\n                    .row()\r\n                        .column(&quot;todo_id&quot;, &quot;e3bdb9af-3dde-40b7-b5fb-4b388567ab45&quot;)\r\n                        .column(&quot;todo_title&quot;, &quot;three&quot;)\r\n                        .column(&quot;finished&quot;, false)\r\n                        .column(&quot;created_at&quot;, &quot;2017-10-01 15:39:28.437&quot;)\r\n                        .end()\r\n                    .build()\r\n            );\r\n}\r\n<\/pre>\n<p>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u7528\u306e\u30af\u30e9\u30b9\u3067\u3059\u3002<br \/>\n\u3053\u308c\u4ee5\u5916\u306b\u30c7\u30fc\u30bf\u306e\u81a8\u3089\u307e\u3057\u7528\u306b\u4f7f\u3048\u308b\u51e6\u7406\u3068\u304b\u3082\u3042\u308a\u307e\u3059\u3002<br \/>\n\u8a73\u3057\u304f\u306fDBSetup\u306e\u672c\u5bb6\uff28\uff30\u306b\u3002\u3002\u3002<\/p>\n<h3 id=\"outline__2_4\">\u3010\u305d\u306e\u4ed6\u8a2d\u5b9a\u3011<\/h3>\n<p>test-context.xml<br \/>\nJdbcTemplate\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\uff08\u30c7\u30fc\u30bf\u691c\u8a3c\u7528\u306e\u305f\u3081\uff09<br \/>\n\u57fa\u672c\u306fapplicationContext.xml\u306e\u8a2d\u5b9a\u3092\u4e38\u30d1\u30af\u30ea\u3057\u3066\u3001\u4e0d\u5fc5\u8981\u306a\u3082\u306e\u3092\u524a\u3063\u305f\u611f\u3058\u3067\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!-- jdbcTemplate\u306e\u8a2d\u5b9a --&gt;\r\n&lt;bean class=&quot;org.springframework.jdbc.core.JdbcTemplate&quot;&gt;\r\n    &lt;constructor-arg ref=&quot;dataSource&quot; \/&gt;\r\n&lt;\/bean&gt;\r\n<\/pre>\n<p>xml\u3068\u304b\u3082\u3046\u898b\u308b\u3060\u3051\u3067\u866b\u553e\u304c\u8d70\u3063\u3066\u7121\u7406\u3060\u308f\uff01\uff01\u3068\u3044\u3046\u65b9\u306b\u306f\u304a\u3059\u3059\u3081\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff57<br \/>\n\u4f55\u3088\u308a\u300c\u6d41\u308c\u308b\u3088\u3046\u306a\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u300d\u3067\u4f5c\u6210\u3059\u308b\u3068\u3044\u3046\u30b3\u30f3\u30bb\u30d7\u30c8\u304c\u30ab\u30c3\u30b3\u3044\u3044\u3057\u4fbf\u5229\u3060\u3057\u697d\u3067\u3059\u3002<\/p>\n<p><span class=\"markerYellow\">\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u306fgithub\u3067\u516c\u958b\u3057\u3066\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/itouoti12\/Spring-Unit-Test-pattern7\">Spring Unit Test pattern7<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Framework\u306eUnit\u30c6\u30b9\u30c8\u5b9f\u88c5\u65b9\u6cd5\u30001-7.Repository\u30c6\u30b9\u30c8(Jun [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":93,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49,27,25,28,40,24,1],"tags":[50,11,13,10,42,41],"class_list":["post-121","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dbsetup","category-junit","category-maven","category-mybatis","category-repository-test","category-spring","category-1","tag-dbsetup","tag-junit","tag-mybatis","tag-spring","tag-spring-test","tag-unittest"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=121"}],"version-history":[{"count":5,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":437,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions\/437"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}