{"id":1024,"date":"2015-09-18T11:06:19","date_gmt":"2015-09-18T03:06:19","guid":{"rendered":"http:\/\/blog.amjet.biz\/IT\/?p=1024"},"modified":"2015-09-18T11:07:24","modified_gmt":"2015-09-18T03:07:24","slug":"springframework-junit-%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/blog.amjet.biz\/IT\/?p=1024","title":{"rendered":"Springframework + JUnit \u8a2d\u5b9a"},"content":{"rendered":"<p><strong>Case #1 \u4f7f\u7528 xml configuration<\/strong><\/p>\n<p>@RunWith(SpringJUnit4ClassRunner.class)<br \/>\n@ContextConfiguration(&#8220;file:WebContent\/WEB-INF\/applicationContext.xml&#8221;)<br \/>\npublic class TestMyDAO {<\/p>\n<p>}<\/p>\n<p><strong>Case#2 java based configuration<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>[ratings]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Case #1 \u4f7f\u7528 xml configuration @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(&#8220;file:WebContent\/WEB-INF\/applicationContext.xml&#8221;) public class TestMyDAO { } Case#2 java based configuration &nbsp; [ratings]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[141],"class_list":["post-1024","post","type-post","status-publish","format-standard","hentry","category-java","tag-springframework-junit"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/1024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1024"}],"version-history":[{"count":2,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/1024\/revisions"}],"predecessor-version":[{"id":1026,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=\/wp\/v2\/posts\/1024\/revisions\/1026"}],"wp:attachment":[{"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.amjet.biz\/IT\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}