{"id":296381,"date":"2019-12-25T15:00:30","date_gmt":"2019-12-25T15:00:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=296381"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=296381","title":{"rendered":"Spring Boot vs Spring MVC vs Spring \u2014 \u041a\u0430\u043a \u043e\u043d\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f?"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481914\/\">\n<h2>Spring Boot vs Spring MVC vs Spring \u2014 \u041a\u0430\u043a \u043e\u043d\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f?<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1280\/0*WCRxEEb2GfjnCMkA.png\" alt=\"image\"\/><\/p>\n<h4>Spring, Spring Boot, Spring MVC, \u0432\u0435\u0437\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0432\u043e \u201cspring\u201d! \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u0433\u0434\u0435 \u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u0431\u0437\u043e\u0440\u044b: Spring, Spring MVC, \u0438 Spring Boot, \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442, \u0438 \u0433\u0434\u0435 \u043e\u043d\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b. \u0421\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u0432 \u0444\u0430\u043a\u0442 \u0447\u0442\u043e \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c \u0447\u0442\u043e Spring, Spring MVC, \u0438 Spring Boot \u043d\u0435 \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u0437\u0430 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e. \u041e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0438 \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442 \u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<h4>\u0427\u0442\u043e \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044d\u0442\u043e\u0442 Spring Framework \u0440\u0435\u0448\u0430\u0435\u0442?<\/h4>\n<p>  \u0414\u043e\u043b\u0433\u043e \u0438 \u0443\u043f\u043e\u0440\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435. \u041a\u0430\u043a\u043e\u0432\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0440\u0435\u0448\u0430\u0435\u043c\u0430\u044f Spring Framework?<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 DI \u0438\u043b\u0438 IOC \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u0430\u0431\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0410 \u0441\u043b\u0430\u0431\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0435\u0437 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/h4>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0438\u0436\u0435: WelcomeController \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 WelcomeService, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u0427\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 WelcomeService?<\/p>\n<pre><code class=\"java\">WelcomeService service = new WelcomeService();<\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u044f \u0441\u043e\u0437\u0434\u0430\u044e \u043c\u043e\u043a \u0434\u043b\u044f WelcomeService \u0432 \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0435 \u0434\u043b\u044f WelcomeController, \u043a\u0430\u043a \u043c\u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c WelcomeController \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u043a? \u041d\u0435 \u043b\u0435\u0433\u043a\u043e!<\/p>\n<pre><code class=\"java\">@RestController public class WelcomeController {   private WelcomeService service = new WelcomeService();   @RequestMapping(&quot;\/welcome&quot;)    public String welcome() {        return service.retrieveWelcomeMessage();    } }<\/code><\/pre>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/h4>\n<p>  \u041c\u0438\u0440 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435 \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0412\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0435 Spring Framework \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u044f\u0436\u0435\u043b\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0432\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438: <a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a> and <a href=\"https:\/\/habr.com\/ru\/users\/autowired\/\" class=\"user_link\">Autowired<\/a>.<\/p>\n<ul>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Component<\/a>, \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c Spring Framework: \u042d\u0439 \u0442\u0430\u043c, \u044d\u0442\u043e \u0431\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0442\u0435\u0431\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/habr.com\/ru\/users\/autowired\/\" class=\"user_link\">Autowired<\/a>, \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c Spring Framework: \u042d\u0439, \u043d\u0430\u0439\u0434\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438 \u0435\u0433\u043e.<\/li>\n<\/ul>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435, Spring framework \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0431\u0438\u043d \u0434\u043b\u044f WelcomeService \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442 \u0435\u0433\u043e \u043a WelcomeController.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435, Spring framework \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0431\u0438\u043d \u0434\u043b\u044f WelcomeService \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442 \u0435\u0433\u043e \u043a WelcomeController.<\/p>\n<p>  \u0412 \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0435, \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c Spring framework \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043e\u043a \u0434\u043b\u044f WelcomeService \u043a WelcomeController. (Spring Boot \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0435\u0449\u0438 \u043f\u0440\u043e\u0449\u0435 \u0434\u0435\u043b\u0430\u044f \u044d\u0442\u043e \u0441 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439 @MockBean. \u041d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f!)<\/p>\n<pre><code class=\"java\">@Component public class WelcomeService {   \/\/Bla Bla Bla }@RestController public class WelcomeController {  @Autowired   private WelcomeService service;  @RequestMapping(&quot;\/welcome&quot;)   public String welcome() {       return service.retrieveWelcomeMessage();   } }<\/code><\/pre>\n<p>  <\/p>\n<h4>\u0427\u0442\u043e \u0435\u0449\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 Spring Framework?<\/h4>\n<p>  <\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 1: \u0414\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\/\u0417\u0430\u0433\u0440\u044f\u0437\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430<\/h4>\n<p>  \u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438 Spring Framework \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439? \u041d\u0435\u0442. \u041e\u043d \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 Spring<\/p>\n<ul>\n<li>Spring JDBC<\/li>\n<li>Spring MVC<\/li>\n<li>Spring AOP<\/li>\n<li>Spring ORM<\/li>\n<li>Spring JMS<\/li>\n<li>Spring Test<\/li>\n<\/ul>\n<p>  \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 Spring JMS \u0438 Spring JDBC \u043d\u0430 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u043b\u0438 \u044d\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c? \u041d\u0435\u0442. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0430 J2EE \u0438\u043b\u0438 Java EE. \u0422\u0430\u043a, \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442? \u041e\u043d\u0438 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438. \u0426\u0435\u043b\u044c\u044e \u044d\u0442\u0438\u0445 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c Boilerplate \u043a\u043e\u0434\/\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/li>\n<li>\u0421\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e\/\u0420\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JDBCTemplate \u0438\u043b\u0438 JMSTemplate \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c JDBC \u0438\u043b\u0438 JMS.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 2: \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438<\/h4>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u043d\u0430\u0441\u0447\u0435\u0442 Spring Framework, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0440\u0435\u0448\u0435\u043d\u044b. \u0412\u0441\u0435 \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442, \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<ul>\n<li>Hibernate \u0434\u043b\u044f ORM<\/li>\n<li>iBatis \u0434\u043b\u044f Object Mapping<\/li>\n<li>JUnit \u0438 Mockito \u0434\u043b\u044f \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d Spring Boot?<\/h4>\n<p>  \u0423 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Spring, \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Spring MVC, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c: component scan, dispatcher servlet, view resolver, web jars(\u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430) \u0441\u0440\u0435\u0434\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0449\u0435\u0439.<\/p>\n<pre><code class=\"xml\">&lt;bean   class=&quot;org.springframework.web.servlet.view.InternalResourceViewResolver&quot;&gt;  &lt;property name=&quot;prefix&quot;&gt;      &lt;value&gt;\/WEB-INF\/views\/&lt;\/value&gt;  &lt;\/property&gt;  &lt;property name=&quot;suffix&quot;&gt;      &lt;value&gt;.jsp&lt;\/value&gt;  &lt;\/property&gt; &lt;\/bean&gt;&lt;mvc:resources mapping=&quot;\/webjars\/**&quot; location=&quot;\/webjars\/&quot;\/&gt;<\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f\u0438\u0447\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e dispatcher servlet \u0432 web \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<pre><code class=\"xml\">&lt;servlet&gt;   &lt;servlet-name&gt;dispatcher&lt;\/servlet-name&gt;   &lt;servlet-class&gt;     org.springframework.web.servlet.DispatcherServlet   &lt;\/servlet-class&gt;   &lt;init-param&gt;     &lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;     &lt;param-value&gt;\/WEB-INF\/todo-servlet.xml&lt;\/param-value&gt;   &lt;\/init-param&gt;   &lt;load-on-startup&gt;1&lt;\/load-on-startup&gt; &lt;\/servlet&gt;&lt;servlet-mapping&gt;    &lt;servlet-name&gt;dispatcher&lt;\/servlet-name&gt;    &lt;url-pattern&gt;\/&lt;\/url-pattern&gt; &lt;\/servlet-mapping&gt;<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Hibernate\/JPA, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439, \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0448\u0442\u0443\u043a\u0438.<\/p>\n<pre><code class=\"xml\">&lt;bean id=&quot;dataSource&quot;  class=&quot;com.mchange.v2.c3p0.ComboPooledDataSource&quot;  destroy-method=&quot;close&quot;&gt;   &lt;property name=&quot;driverClass&quot; value=&quot;${db.driver}&quot; \/&gt;   &lt;property name=&quot;jdbcUrl&quot; value=&quot;${db.url}&quot; \/&gt;   &lt;property name=&quot;user&quot; value=&quot;${db.username}&quot; \/&gt;   &lt;property name=&quot;password&quot; value=&quot;${db.password}&quot; \/&gt; &lt;\/bean&gt;&lt;jdbc:initialize-database data-source=&quot;dataSource&quot;&gt;   &lt;jdbc:script location=&quot;classpath:config\/schema.sql&quot; \/&gt;   &lt;jdbc:script location=&quot;classpath:config\/data.sql&quot; \/&gt; &lt;\/jdbc:initialize-database&gt;&lt;bean class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;  id=&quot;entityManagerFactory&quot;&gt;   &lt;property name=&quot;persistenceUnitName&quot; value=&quot;hsql_pu&quot; \/&gt;   &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot; \/&gt; &lt;\/bean&gt;&lt;bean id=&quot;transactionManager&quot;class=&quot;org.springframework.orm.jpa.JpaTransactionManager&quot;&gt;  &lt;property name=&quot;entityManagerFactory&quot; ref=&quot;entityManagerFactory&quot; \/&gt;                                &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot; \/&gt; &lt;\/bean&gt;&lt;tx:annotation-driven transaction-manager=&quot;transactionManager&quot;\/&gt;<\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 1: Spring Boot \u0430\u0432\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f: \u041c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0434\u0443\u043c\u0430\u0442\u044c \u0438\u043d\u0430\u0447\u0435?<\/h4>\n<p>  Spring Boot \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043d\u043e\u0432\u044b\u0439 \u043c\u044b\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043e\u043a\u0440\u0443\u0433 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e.<\/p>\n<ul>\n<li>\u0427\u0442\u043e \u043d\u0430\u0441\u0447\u0435\u0442 \u0430\u0432\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0441\u043b\u0438 jar-\u0444\u0430\u0439\u043b Hibernate \u0435\u0441\u0442\u044c \u0432 classpath?<\/li>\n<li>\u0427\u0442\u043e \u043d\u0430\u0441\u0447\u0435\u0442 \u0430\u0432\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 a Dispatcher Servlet \u0435\u0441\u043b\u0438 Spring MVC jar \u0435\u0441\u0442\u044c \u0432 classpath?<\/li>\n<\/ul>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 2: Spring Boot Starter Projects: \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0432\u043e\u043a\u0440\u0443\u0433 \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432<\/h4>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043a\u0430\u0436\u0435\u043c \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043a\u0430\u043a \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0434\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c.<\/p>\n<p>  \u0423 \u0432\u0441\u0435\u0445 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438. \u041d\u0438\u0436\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 Spring MVC. \u041e\u043d\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f Spring MVC, Jackson Databind, Hibernate-Validator \u0438 Log4j.<\/p>\n<pre><code class=\"xml\">&lt;dependency&gt;   &lt;groupId&gt;org.springframework&lt;\/groupId&gt;   &lt;artifactId&gt;spring-webmvc&lt;\/artifactId&gt;   &lt;version&gt;4.2.2.RELEASE&lt;\/version&gt; &lt;\/dependency&gt;&lt;dependency&gt;   &lt;groupId&gt;com.fasterxml.jackson.core&lt;\/groupId&gt;   &lt;artifactId&gt;jackson-databind&lt;\/artifactId&gt;   &lt;version&gt;2.5.3&lt;\/version&gt; &lt;\/dependency&gt;&lt;dependency&gt;   &lt;groupId&gt;org.hibernate&lt;\/groupId&gt;   &lt;artifactId&gt;hibernate-validator&lt;\/artifactId&gt;   &lt;version&gt;5.0.2.Final&lt;\/version&gt; &lt;\/dependency&gt;&lt;dependency&gt;   &lt;groupId&gt;log4j&lt;\/groupId&gt;   &lt;artifactId&gt;log4j&lt;\/artifactId&gt;   &lt;version&gt;1.2.17&lt;\/version&gt; &lt;\/dependency&gt;<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f RESTful \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 \u2014 Spring Boot Start Web. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 Spring Boot Starter Web \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Spring Initializr.<\/p>\n<h4>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f Spring Boot Starter Web<\/h4>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;dependency&gt;   &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;   &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt; &lt;\/dependency&gt;<\/code><\/pre>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/635\/0*tYkQPFoN8FxSTQIY.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430:<\/p>\n<ul>\n<li>Spring: core, beans, context, aop<\/li>\n<li>Web MVC: (Spring MVC)<\/li>\n<li>Jackson: \u0434\u043b\u044f JSON \u0441\u0432\u044f\u0437\u0438<\/li>\n<li>\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f: Hibernate Validator, Validation API<\/li>\n<li>Embedded Servlet Container: Tomcat<\/li>\n<li>\u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: logback, slf4j<\/li>\n<\/ul>\n<p>  \u041b\u044e\u0431\u043e\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0435 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. Spring Boot Starter Web \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043d\u0438\u043c\u0438. \u041a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043c\u043d\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e\u0431 \u044d\u0442\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u0438\u043b\u0438 \u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445.<\/p>\n<h4>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Spring Boot Starter<\/h4>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0438\u0437 Spring Boot Starter Web, \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0430\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<ul>\n<li>spring-boot-starter-web-services: SOAP Web Services<\/li>\n<li>spring-boot-starter-web: Web \u0438 RESTful \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>spring-boot-starter-test: \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\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<\/li>\n<li>spring-boot-starter-jdbc: \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 JDBC<\/li>\n<li>spring-boot-starter-hateoas: \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c HATEOAS \u0444\u0438\u0447\u0438 \u043a \u0432\u0430\u0448\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c<\/li>\n<li>spring-boot-starter-security: \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Spring Security<\/li>\n<li>spring-boot-starter-data-jpa: Spring Data JPA \u0441 Hibernate<\/li>\n<li>spring-boot-starter-cache: Enabling Spring Framework\u2019s \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<li>spring-boot-starter-data-rest: \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 REST \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Spring Data REST<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u0414\u0440\u0443\u0433\u0438\u0435 \u0446\u0435\u043b\u0438 Spring Boot<\/h4>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0440\u0442\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u0449\u0435\u0439:<\/p>\n<ul>\n<li>spring-boot-starter-actuator: \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/li>\n<li>spring-boot-starter-undertow, spring-boot-starter-jetty, spring-boot-starter-tomcat: \u0414\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u043e\u0432<\/li>\n<li>spring-boot-starter-logging: \u0414\u043b\u044f \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f logback<\/li>\n<li>spring-boot-starter-log4j2: \u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Log4j2<\/li>\n<\/ul>\n<p>  Spring Boot \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u0430 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u0436\u0430\u0442\u044b\u0439 \u0441\u0440\u043e\u043a.<\/p>\n<ul>\n<li>Actuator: \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/li>\n<li>Embedded Server Integrations: \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u0435\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/li>\n<li>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/li>\n<\/ul>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \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\/post\/481914\/\"> https:\/\/habr.com\/ru\/post\/481914\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481914\/\">\n<h2>Spring Boot vs Spring MVC vs Spring \u2014 \u041a\u0430\u043a \u043e\u043d\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f?<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1280\/0*WCRxEEb2GfjnCMkA.png\" alt=\"image\"\/><\/p>\n<h4>Spring, Spring Boot, Spring MVC, \u0432\u0435\u0437\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0432\u043e \u201cspring\u201d! \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u0433\u0434\u0435 \u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u0431\u0437\u043e\u0440\u044b: Spring, Spring MVC, \u0438 Spring Boot, \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442, \u0438 \u0433\u0434\u0435 \u043e\u043d\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b. \u0421\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u0432 \u0444\u0430\u043a\u0442 \u0447\u0442\u043e \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c \u0447\u0442\u043e Spring, Spring MVC, \u0438 Spring Boot \u043d\u0435 \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u0437\u0430 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043c\u0435\u0441\u0442\u043e. \u041e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0438 \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442 \u0438\u0445 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<h4>\u0427\u0442\u043e \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044d\u0442\u043e\u0442 Spring Framework \u0440\u0435\u0448\u0430\u0435\u0442?<\/h4>\n<p>  \u0414\u043e\u043b\u0433\u043e \u0438 \u0443\u043f\u043e\u0440\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435. \u041a\u0430\u043a\u043e\u0432\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0440\u0435\u0448\u0430\u0435\u043c\u0430\u044f Spring Framework?<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 DI \u0438\u043b\u0438 IOC \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u0430\u0431\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0410 \u0441\u043b\u0430\u0431\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0435\u0437 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/h4>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0438\u0436\u0435: WelcomeController \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 WelcomeService, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u0427\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 WelcomeService?<\/p>\n<pre><code class=\"java\">WelcomeService service = new WelcomeService();<\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u044f \u0441\u043e\u0437\u0434\u0430\u044e \u043c\u043e\u043a \u0434\u043b\u044f WelcomeService \u0432 \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u0435 \u0434\u043b\u044f WelcomeController, \u043a\u0430\u043a \u043c\u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c WelcomeController \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u043a? \u041d\u0435 \u043b\u0435\u0433\u043a\u043e!<\/p>\n<pre><code class=\"java\">@RestController public class WelcomeController {   private WelcomeService service = new WelcomeService();   @RequestMapping(&quot;\/welcome&quot;)    public String welcome() {        return service.retrieveWelcomeMessage();    } }<\/code><\/pre>\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-296381","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296381","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=296381"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296381\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}