{"id":305439,"date":"2020-06-16T15:01:23","date_gmt":"2020-06-16T15:01:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305439"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305439","title":{"rendered":"\u041a\u043d\u0438\u0433\u0430 \u00abSpring Boot 2: \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u043e\u0432\u00bb"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/506872\/\"><a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/506872\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fp\/9-\/xm\/fp9-xmowkjaidjekn_hk0ddmiic.jpeg\" align=\"left\" alt=\"image\"><\/a>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0438! \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439?<\/p>\n<p>  \u0423\u0432\u0435\u043b\u0438\u0447\u044c\u0442\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438\u0437\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u0437\u0430\u0431\u043e\u0442 \u043f\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Spring.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Spring Boot 2 \u0438 \u0442\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Spring 5, \u043a\u0430\u043a WebFlux, Security, Actuator, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Micrometer, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring<\/h3>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0438\u0434\u0435\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Spring \u2014 \u043f\u043e\u043e\u0449\u0440\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438 \u0441\u043b\u0430\u0431\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0438 \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c. \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Spring \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0435 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Spring \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d). \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f JUnit \u0438\u043b\u0438 TestNG \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 new \u2014 \u0431\u0435\u0437 Spring \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430).<\/p>\n<p>  \u0412 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Spring \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (Environment, PropertySource, JNDI, Servlet; \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ServerHttpRequest \u0438 ServerHttpResponse), \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 Spring \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0435\u0433\u043e \u0437\u0430\u0434\u0430\u0447\u0438:<br \/>  \u0081<\/p>\n<ul>\n<li>\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 Spring IoC \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432;<\/li>\n<li>\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438;<\/li>\n<li>\u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f Spring \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/li>\n<\/ul>\n<p>  \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Spring \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u0442\u0435\u0441\u0442\u044b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (ApplicationContext). \u041c\u043e\u0434\u0443\u043b\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ApplicationContext, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439.<\/p>\n<ul>\n<li>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f BootstrapWith. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 TestContext Spring.<\/li>\n<li>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @ContextConfiguration. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 ApplicationContext \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u042d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c ApplicationContext \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/li>\n<li>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @WebAppConfiguration. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f, \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u043c \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c WebApplicationContext.<\/li>\n<li>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @ActiveProfile. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 ApplicationContext \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430.<\/li>\n<li>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @TestPropertySource. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0432 \u043d\u0430\u0431\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 PropertySource \u0432 Environment \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 ApplicationContext.<\/li>\n<li>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @DirtiesContext. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 ApplicationContext \u0431\u044b\u043b \u00ab\u0437\u0430\u0433\u0440\u044f\u0437\u043d\u0435\u043d\u00bb \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d \u0438\u043b\u0438 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d \u043f\u0443\u0442\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430-\u043e\u0434\u0438\u043d\u043e\u0447\u043a\u0438) \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043a\u0440\u044b\u0442.<\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 (@TestExecutionListeners, <a href=\"https:\/\/habr.com\/ru\/users\/commit\/\" class=\"user_link\">Commit<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/rollback\/\" class=\"user_link\">Rollback<\/a>, @BeforeTransaction, @AfterTransaction, <a href=\"https:\/\/habr.com\/ru\/users\/sql\/\" class=\"user_link\">Sql<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/sql\/\" class=\"user_link\">Sql<\/a>Group, <a href=\"https:\/\/habr.com\/ru\/users\/sql\/\" class=\"user_link\">Sql<\/a>Config, <a href=\"https:\/\/habr.com\/ru\/users\/timed\/\" class=\"user_link\">Timed<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/repeat\/\" class=\"user_link\">Repeat<\/a>, @IfProfileValue \u0438 \u0442. \u0434.).<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Spring. \u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RunWith, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @ContextConfiguration({&quot;\/app-config.xml&quot;, &quot;\/test-data-access-config.xml&quot;}) @ActiveProfiles(&quot;dev&quot;) @Transactional public class ToDoRepositoryTests {          @Test         public void ToDoPersistenceTest(){                 \/\/...         } }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring \u0438 \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Spring Boot.<\/p>\n<h3>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot<\/h3>\n<p>  Spring Boot \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043e\u0449\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044f \u0441\u0442\u0430\u0440\u044b\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043b\u0438\u0448\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c spring-boot-starter-test \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 test (scope test). \u0412 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 Spring Initializr \u044d\u0442\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430.<\/p>\n<p>  \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c spring-boot-starter-test \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot: JUnit, AssertJ, Hamcrest, Mockito, JSONassert \u0438 JsonPath. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c Spring Boot Test; \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>  Spring Boot \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @SpringBootTest, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0443\u044e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Spring. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Spring \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0435 \u0432 Spring Boot \u2014 \u0445\u043e\u0442\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @RunWith(SpringRunner.class); \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043b\u044e\u0431\u044b\u0435 \u043d\u043e\u0432\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0423 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 @SpringBootTest \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 RANDOM_PORT \u0438 DEFINED_PORT.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u0430\u0440\u043a\u0430\u0441 \u0442\u0435\u0441\u0442\u0430 Spring Boot.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @SpringBootTest public class MyTests {          @Test         public void exampleTest() {                  ...         } }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  Spring Boot \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a: \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441 MockMvc:<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @SpringBootTest @AutoConfigureMockMvc public class MockMvcToDoTests {          @Autowired         private MockMvc mvc;          @Test         public void toDoTest() throws Exception {               this.mvc               .perform(get(&quot;\/todo&quot;))               .andExpect(status().isOk())               .andExpect(content()                    .contentType(MediaType.APPLICATION_JSON_UTF8));         } }<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u043c TestRestTemplate.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class ToDoSimpleRestTemplateTests {        @Autowired       private TestRestTemplate restTemplate;        @Test       public void toDoTest() {             String body = this.restTemplate.getForObject(&quot;\/todo&quot;, String.class);             assertThat(body).contains(&quot;Read a Book&quot;);       } }<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0442\u0435\u0441\u0442, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 TestRestTemplate \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \/todo. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 String (\u044d\u0442\u043e \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 JSON; \u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c, \u0434\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 TestRestTemplate \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e).<\/p>\n<h3>\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/h3>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @MockBean, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 Mockito \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 ApplicationContext. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 Spring \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u044d\u0442\u0443 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e. \u041f\u043e\u043c\u043d\u0438\u0442\u0435: \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 ApplicationContext.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @SpringBootTest public class ToDoSimpleMockBeanTests {          @MockBean         private ToDoRepository repository;          @Test         public void toDoTest() {               given(this.repository.findById(&quot;my-id&quot;))                     .Return(new ToDo(&quot;Read a Book&quot;));               assertThat(                     this.repository.findById(&quot;my-id&quot;).getDescription())                     .isEqualTo(&quot;Read a Book&quot;);         } }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0441\u0440\u0435\u0437\u044b Spring Boot<\/h3>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Spring Boot \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u041c\u043e\u0434\u0443\u043b\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0441\u0440\u0435\u0437\u044b (slices), \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u043b\u0438 \u0421\u0423\u0411\u0414.<\/p>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @JsonTest<\/h3>\n<p>  \u0412 \u043c\u043e\u0434\u0443\u043b\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u0435\u0441\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @JsonTest, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0430\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e\/\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e JSON-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0430\u044f, \u0432\u0441\u0435 \u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. @JsonTest \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e JSON-\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u043f\u043e \u043f\u0443\u0442\u0438 \u043a \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: Jackson, GSON \u0438\u043b\u0438 JSONB.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @JsonTest public class ToDoJsonTests {        @Autowired       private JacksonTester&lt;ToDo&gt; json;        @Test       public void toDoSerializeTest() throws Exception {             ToDo toDo = new ToDo(&quot;Read a Book&quot;);              assertThat(this.json.write(toDo))             .isEqualToJson(&quot;todo.json&quot;);             assertThat(this.json.write(toDo))             .hasJsonPathStringValue(&quot;@.description&quot;);              assertThat(this.json.write(toDo))             .extractingJsonPathStringValue(&quot;@.description&quot;)             .isEqualTo(&quot;Read a Book&quot;);       }        @Test       public void toDoDeserializeTest() throws Exception {             String content = &quot;{\\&quot;description\\&quot;:\\&quot;Read a Book\\&quot;,\\&quot;completed\\&quot;:                   true }&quot;;             assertThat(this.json.parse(content))                   .isEqualTo(new ToDo(&quot;Read a Book&quot;, true));             assertThat(                this.json.parseObject(content).getDescription())             .isEqualTo(&quot;Read a Book&quot;);       } }<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 Spring Boot \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 @WebMvcTest, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Spring MVC \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438: <a href=\"https:\/\/habr.com\/ru\/users\/controller\/\" class=\"user_link\">Controller<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/controller\/\" class=\"user_link\">Controller<\/a>Advice, @JsonComponent, Converter, GenericConverter, Filter, WebMvcConfigurer \u0438 HandlerMethodArgumentResolver; \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0442\u0430\u043a \u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u0430\u0448\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0430\u043a <a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @MockBean.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @WebMvcTest(ToDoController.class) public class ToDoWebMvcTest {        @Autowired       private MockMvc mvc;        @MockBean       private ToDoRepository toDoRepository;        @Test       public void toDoControllerTest() throws Exception {             given(this.toDoRepository.findById(&quot;my-id&quot;))                   .Return(new ToDo(&quot;Do Homework&quot;, true));                   this.mvc.perform(get(&quot;\/todo\/my-id&quot;).accept(MediaType.APPLICATION_                      JSON_UTF8))                         .andExpect(status().isOk()).andExpect(content().                            string(&quot;{\\&quot;id\\&quot;:\\&quot;my-id\\&quot;,\\&quot;description\\&quot;:\\&quot;Do Homework\\&quot;,                            \\&quot;completed\\&quot;:true}&quot;));       } }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @WebFluxTest<\/h3>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 Spring Boot \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @WebFluxTest. \u042d\u0442\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043c\u043e\u0434\u0443\u043b\u044f Spring WebFlux \u0438 \u0438\u0449\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/habr.com\/ru\/users\/controller\/\" class=\"user_link\">Controller<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/controller\/\" class=\"user_link\">Controller<\/a>Advice, @JsonComponent, Converter, GenericConverter \u0438 WebFluxConfigurer.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0430\u043a <a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @MockBean.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @WebFluxTest(ToDoFluxController.class) public class ToDoWebFluxTest {        @Autowired       private WebTestClient webClient;        @MockBean       private ToDoRepository toDoRepository;        @Test       public void testExample() throws Exception {              given(this.toDoRepository.findAll())                          .Return(Arrays.asList(new ToDo(&quot;Read a Book&quot;), new                                ToDo(&quot;Buy Milk&quot;)));              this.webClient.get().uri(&quot;\/todo-flux&quot;).accept(MediaType.                   APPLICATION_JSON_UTF8)                        .exchange()                        .expectStatus().isOk()                        .expectBody(List.class);       } }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @DataJpaTest<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f JPA-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @DataJpaTest, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0449\u0443\u044e \u0430\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c\u044b\u0445 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u041e\u043d\u0430 \u0438\u0449\u0435\u0442 <a href=\"https:\/\/habr.com\/ru\/users\/entity\/\" class=\"user_link\">Entity<\/a> \u0438 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 <a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a>. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 TestEntityManager, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441 JPA EntityManager.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @DataJpaTest public class TodoDataJpaTests {          @Autowired       private TestEntityManager entityManager;        @Autowired       private ToDoRepository repository;        @Test       public void toDoDataTest() throws Exception {             this.entityManager.persist(new ToDo(&quot;Read a Book&quot;));             Iterable&lt;ToDo&gt; toDos = this.repository.                    findByDescriptionContains(&quot;Read a Book&quot;);             assertThat(toDos.iterator().next()).toString().contains(&quot;Read a Book&quot;);       } }<\/code><\/pre>\n<p>  \u0423\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e @DataJpaTest \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0421\u0423\u0411\u0414 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0436\u0435 \u0441 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043d\u0430\u0431\u0434\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0442\u0435\u0441\u0442\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 @AutoConfigureTestDatabase(replace=Replace.NONE).<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @DataJpaTest @AutoConfigureTestDatabase(replace=Replace.NONE) public class TodoDataJpaTests {         \/\/... }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @JdbcTest<\/h3>\n<p>  \u042d\u0442\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 @DataJpaTest; \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u2014 \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 JDBC \u0442\u0435\u0441\u0442\u044b. \u041e\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0421\u0423\u0411\u0414, \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0439 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0438 \u043a\u043b\u0430\u0441\u0441\u0430 JdbcTemplate, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \u0441\u043d\u0430\u0431\u0436\u0435\u043d\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a> \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @JdbcTest @Transactional(propagation = Propagation.NOT_SUPPORTED) public class TodoJdbcTests {        @Autowired       private NamedParameterJdbcTemplate jdbcTemplate;        private CommonRepository&lt;ToDo&gt; repository;          @Test         public void toDoJdbcTest() {               ToDo toDo = new ToDo(&quot;Read a Book&quot;);              this.repository = new ToDoRepository(jdbcTemplate);             this.repository.save(toDo);              ToDo result = this.repository.findById(toDo.getId());             assertThat(result.getId()).isEqualTo(toDo.getId());         } }<\/code><\/pre>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @DataMongoTest<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 MongoDB \u043c\u043e\u0434\u0443\u043b\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @DataMongoTest. \u041e\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Mongo, \u0435\u0441\u043b\u0438 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d; \u0435\u0441\u043b\u0438 \u0436\u0435 \u043d\u0435\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 spring.data.mongodb.*. \u041e\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u0430 MongoTemplate \u0438 \u0438\u0449\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 @Document. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b <a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a> \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @DataMongoTest public class TodoMongoTests {        @Autowired       private MongoTemplate mongoTemplate;        @Test       public void toDoMongoTest() {           ToDo toDo = new ToDo(&quot;Read a Book&quot;);           this.mongoTemplate.save(toDo);            ToDo result = this.mongoTemplate.findById(toDo.getId(),ToDo.class);           assertThat(result.getId()).isEqualTo(toDo.getId());       } }<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 MongoDB (\u043d\u0435\u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c, \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u043c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438) \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @DataMongoTest \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 excludeAutoConfiguration = EmbeddedMongoAutoConfiguration.class.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @DataMongoTest(excludeAutoConfiguration = EmbeddedMongoAutoConfiguration.class) public class ToDoMongoTests {         \/\/ ... }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RestClientTest<\/h3>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u2014 @RestClientTest, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f REST-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Jackson, GSON \u0438 JSONB, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 RestTemplateBuilder \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 MockRestServiceServer.<\/p>\n<pre><code class=\"java\">@RunWith(SpringRunner.class) @RestClientTest(ToDoService.class) public class ToDoRestClientTests {        @Autowired       private ToDoService service;        @Autowired       private MockRestServiceServer server;        @Test       public void toDoRestClientTest()                   throws Exception {              String content = &quot;{\\&quot;description\\&quot;:\\&quot;Read a Book\\&quot;,\\&quot;completed\\&quot;:                    true }&quot;;             this.server.expect(requestTo(&quot;\/todo\/my-id&quot;))              .andRespond(withSuccess(content,MediaType.APPLICATION_JSON_UTF8));             ToDo result = this.service.findById(&quot;my-id&quot;);             assertThat(result).isNotNull();             assertThat(result.getDescription()).contains(&quot;Read a Book&quot;);       } }<\/code><\/pre>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0437\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c: \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u0423\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Spring Boot \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0440\u0435\u0437\u044b.<\/p>\n<h3>\u041e\u0431 \u0430\u0432\u0442\u043e\u0440\u0435<\/h3>\n<p>  <b>\u0424\u0435\u043b\u0438\u043f\u0435 \u0413\u0443\u0442\u044c\u0435\u0440\u0440\u0435\u0441<\/b> (Felipe Gutierrez) \u2014 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u041f\u041e, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439 \u0434\u0438\u043f\u043b\u043e\u043c\u044b \u0431\u0430\u043a\u0430\u043b\u0430\u0432\u0440\u0430 \u0438 \u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0432 \u0418\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0438 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u0440\u043e\u0434\u0430 \u041c\u043e\u043d\u0442\u0435\u0440\u0440\u0435\u0439, \u041c\u0435\u043a\u0441\u0438\u043a\u0430. \u0423 \u0413\u0443\u0442\u044c\u0435\u0440\u0440\u0435\u0441\u0430 \u0431\u043e\u043b\u0435\u0435 20 \u043b\u0435\u0442 \u043e\u043f\u044b\u0442\u0430 \u0432 \u0441\u0444\u0435\u0440\u0435 IT, \u043e\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0440\u0430\u0441\u043b\u0435\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0440\u043e\u0437\u043d\u0438\u0447\u043d\u0430\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u044f, \u0437\u0434\u0440\u0430\u0432\u043e\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0435 \u0434\u0435\u043b\u043e. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Pivotal, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 PAS \u0438 PKS \u0434\u043b\u044f Cloud Foundry, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 Spring, \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 Spring, Groovy \u0438 RabbitMQ, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0438\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u041f\u041e \u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445, \u043a\u0430\u043a Nokia, Apple, Redbox \u0438 Qualcomm. \u0413\u0443\u0442\u044c\u0435\u0440\u0440\u0435\u0441 \u2014 \u0430\u0432\u0442\u043e\u0440 \u043a\u043d\u0438\u0433 Spring Boot Messaging (Apress, 2017) \u0438 Introducing Spring Framework (Apress, 2014).<\/p>\n<h3>\u041e \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u0445<\/h3>\n<p>  <i>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u0434\u0430\u043d\u0438\u0435<\/i><br \/>  <b>\u041c\u0430\u043d\u0443\u044d\u043b\u044c \u0416\u043e\u0440\u0434\u0430\u043d \u042d\u043b\u0435\u0440\u0430<\/b> (Manuel Jordan Elera) \u2014 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a-\u0441\u0430\u043c\u043e\u0443\u0447\u043a\u0430 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043e\u0431\u043e\u0436\u0430\u0435\u0442 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u043e\u0432\u044b\u0445 \u0438\u0445 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0439. \u041c\u0430\u043d\u0443\u044d\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043f\u0440\u0435\u043c\u0438\u0438 Springy Award Community Champion \u0438 Spring Champion 2013. \u041d\u0435\u043c\u043d\u043e\u0433\u043e\u0435 \u0438\u043c\u0435\u044e\u0449\u0435\u0435\u0441\u044f \u0443 \u043d\u0435\u0433\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043d \u043f\u043e\u0441\u0432\u044f\u0449\u0430\u0435\u0442 \u0447\u0442\u0435\u043d\u0438\u044e \u0411\u0438\u0431\u043b\u0438\u0438 \u0438 \u0441\u043e\u0447\u0438\u043d\u0435\u043d\u0438\u044e \u043c\u0443\u0437\u044b\u043a\u0438 \u043d\u0430 \u0433\u0438\u0442\u0430\u0440\u0435. \u041c\u0430\u043d\u0443\u044d\u043b\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043f\u043e\u0434 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u043e\u043c dr_pompeii. \u041e\u043d \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b \u043d\u0430\u0443\u0447\u043d\u0443\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u0443\u0440\u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u043a\u043d\u0438\u0433, \u0432\u043a\u043b\u044e\u0447\u0430\u044f Pro Spring, 4-\u0435 \u0438\u0437\u0434\u0430\u043d\u0438\u0435 (Apress, 2014)1, Practical Spring LDAP (Apress, 2013), Pro JPA 2, 2-\u0435 \u0438\u0437\u0434\u0430\u043d\u0438\u0435 (Apress, 2013) \u0438 Pro Spring Security (Apress, 2013).<\/p>\n<p>  <i>\u0420\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0435 \u0438\u0437\u0434\u0430\u043d\u0438\u0435<\/i><br \/>  <b>\u0412\u0430\u043b\u0435\u0440\u0438\u0439 \u0410\u043b\u0435\u043a\u0441\u0435\u0435\u0432\u0438\u0447 \u0414\u043c\u0438\u0442\u0440\u0443\u0449\u0435\u043d\u043a\u043e\u0432<\/b> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 IT \u0431\u043e\u043b\u0435\u0435 35 \u043b\u0435\u0442. \u0420\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438 \u043e\u0442\u0440\u0430\u0441\u043b\u0435\u0439, \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u043b \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u0423\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043e\u0440\u0433\u0430\u043d\u043e\u0432, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u043c\u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438: \u041e\u041e\u041d, USIAD, World Bank \u0432 \u0420\u043e\u0441\u0441\u0438\u0438, \u041a\u043e\u0441\u043e\u0432\u043e, \u041c\u043e\u043b\u0434\u0430\u0432\u0438\u0438 \u0438 \u0410\u0440\u043c\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u00bb \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0441 \u043a\u043d\u0438\u0433\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/www.piter.com\/collection\/new\/product\/spring-boot-2-luchshie-praktiki-dlya-professionalov?_gs_cttl=120&amp;gs_direct_link=1&amp;gsaid=82744&amp;gsmid=29789&amp;gstid=c\">\u0441\u0430\u0439\u0442\u0435 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/a><br \/>  \u00bb <a href=\"https:\/\/storage.piter.com\/upload\/contents\/978544611587\/978544611587_X.pdf\">\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a><br \/>  \u00bb <a href=\"https:\/\/storage.piter.com\/upload\/contents\/978544611587\/978544611587_p.pdf\">\u041e\u0442\u0440\u044b\u0432\u043e\u043a<\/a><\/p>\n<p>  \u0414\u043b\u044f \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u043a\u0438\u0434\u043a\u0430 25% \u043f\u043e \u043a\u0443\u043f\u043e\u043d\u0443 \u2014 <b>Spring Boot<\/b><\/p>\n<p>  \u041f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u043b\u0430\u0442\u044b \u0431\u0443\u043c\u0430\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043d\u0438\u0433\u0438 \u043d\u0430 e-mail \u0432\u044b\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/506872\/\"> https:\/\/habr.com\/ru\/company\/piter\/blog\/506872\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/506872\/\"><a href=\"https:\/\/habr.com\/ru\/company\/piter\/blog\/506872\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fp\/9-\/xm\/fp9-xmowkjaidjekn_hk0ddmiic.jpeg\" align=\"left\" alt=\"image\"><\/a>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0438! \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439?<\/p>\n<p>  \u0423\u0432\u0435\u043b\u0438\u0447\u044c\u0442\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438\u0437\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u0437\u0430\u0431\u043e\u0442 \u043f\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Spring.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Spring Boot 2 \u0438 \u0442\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Spring 5, \u043a\u0430\u043a WebFlux, Security, Actuator, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Micrometer, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-305439","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305439"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305439\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}