{"id":328227,"date":"2022-01-18T21:00:22","date_gmt":"2022-01-18T21:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328227"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328227","title":{"rendered":"<span>Telegram-\u0431\u043e\u0442 \u043d\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0430\u0445 \u2014 Java+Spring, Redis, \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438 \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 Heroku \u2014 \u0441\u043d\u043e\u0432\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/v9\/mj\/xn\/v9mjxnpeteb00fprvqucr_lmxng.png\"\/><\/p>\n<h3>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0435\u0440\u0438\u044f\u0445<\/h3>\n<p>  \u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432 \u043c\u043e\u0435\u0439 \u0441\u0435\u0440\u0438\u0438 \u00ab\u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445\u00bb \u2014 <a href=\"https:\/\/habr.com\/ru\/post\/528694\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f<\/a> \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u00ab\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443\u00bb Telegram-\u0431\u043e\u0442\u0443, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u043c\u0443 \u043e\u0442 <code>TelegramLongPollingBot<\/code>.<\/p>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 Telegram-\u0431\u043e\u0442\u043e\u0432 \u043d\u0430 Java \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u2014 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441. \u0412 \u043d\u0435\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u0441 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043a\u0430\u043a \u043c\u0430\u043d\u0443\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043a\u0435\u043b\u0435\u0442\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435.<\/p>\n<p>  \u042f \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u0434\u043b\u044f \u0441\u0435\u0431\u044f, \u0430 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0443\u043c\u043d\u044b\u0445 \u2014 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u044a\u0435\u0445\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u0443.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>  \u0423\u0447\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u2014 \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0447\u043d\u043e\u0435, \u0430 \u0435\u0441\u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043b\u043e\u0431, \u0435\u0449\u0451 \u0438 \u043c\u0430\u043b\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u0447\u0435\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/on\/sa\/jg\/onsajg8bdnbkymxj0nflhpv92q4.png\"\/><\/p>\n<p>  \u0420\u0435\u0431\u0451\u043d\u043e\u043a \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c. \u041f\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f\u043c, \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u0438\u0434\u0451\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e. \u0414\u0435\u043b\u043e \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u0442\u0430 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0439.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0427\u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0435\u0441\u0442\u044c, \u0447\u0435\u0433\u043e \u043d\u0435\u0442<\/h3>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e:<\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0435\u043a\u0435\u043d\u0434\u0430 Telegram-\u0431\u043e\u0442\u0430 \u043d\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0430\u0445 \u043d\u0430 Java 11 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Spring;<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Redis;<\/li>\n<li>\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432;<\/li>\n<li>\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440;<\/li>\n<li>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430;<\/li>\n<li>\u0434\u0435\u043f\u043b\u043e\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u0430 \u043d\u0430 Heroku, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 Heroku Redis.<\/li>\n<\/ul>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435\u0442 \u043f\u0440\u043e:<\/p>\n<ul>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u043e\u0442\u043e\u0432, \u043d\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435;<\/li>\n<li>\u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Apache POI \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Word \u0438 Excel \u0444\u0430\u0439\u043b\u043e\u0432;<\/li>\n<li>\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 BotFather (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445, \u0432\u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u043f\u0430\u0432\u0448\u0438\u0439\u0441\u044f <a href=\"https:\/\/botcreators.ru\/blog\/kak-sozdat-svoego-bota-v-botfather\/\" rel=\"nofollow noopener noreferrer\">\u043c\u0430\u043d\u0443\u0430\u043b<\/a>;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 \u0411\u0414 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/li>\n<\/ul>\n<p>  \u0418\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 <a href=\"https:\/\/github.com\/taksebe-official\/writeReadRightBot\" rel=\"nofollow noopener noreferrer\">GitHub<\/a>. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0434\u0440\u0443\u0433 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443, \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u0440\u043e\u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e.<\/p>\n<h3>\u0411\u0438\u0437\u043d\u0435\u0441-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u043e\u0442\u0430<\/h3>\n<p>  \u0411\u043e\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Word-\u0444\u0430\u0439\u043b\u044b \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c\u0438 \u0438\u0437 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e);<\/li>\n<li>\u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u0432 Excel-\u0444\u0430\u0439\u043b\u044b (\u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f);<\/li>\n<li>\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c;<\/li>\n<li>\u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u043a\u0443.<\/li>\n<\/ul>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u044b\u043a\u0430\u0442\u044c \u2014 <a href=\"https:\/\/t.me\/WriteReadRightBot\" rel=\"nofollow noopener noreferrer\">WriteReadRightBot<\/a>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/gq\/cf\/kz\/gqcfkz_7ftblicgnqlsiarvdjjs.png\"\/><\/p>\n<h3>\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438;<\/li>\n<li>\u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0411\u0414;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u043e\u0442\u0430;<\/li>\n<li>\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u043c\u0438;<\/li>\n<li>\u0440\u0430\u0441\u043a\u0443\u0440\u0438\u0442\u044c \u043f\u0440\u0438\u0451\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432;<\/li>\n<li>\u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e;<\/li>\n<li>\u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043d\u0430 heroku.<\/li>\n<\/ul>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0443\u043d\u043a\u0442.<\/p>\n<h3>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/maven.apache.org\/\" rel=\"nofollow noopener noreferrer\">Apache Maven<\/a>. \u041d\u0443\u0436\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e Telegram Spring Boot, <a href=\"https:\/\/redis.io\/\" rel=\"nofollow noopener noreferrer\">Redis<\/a> \u0438 <a href=\"https:\/\/projectlombok.org\/\" rel=\"nofollow noopener noreferrer\">Lombok<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 (\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 java-\u043c\u0435\u0442\u043e\u0434\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438).<\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u0432\u044b\u0448\u043b\u043e \u0432  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">pom.xml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">    &lt;parent>         &lt;groupId>org.springframework.boot&lt;\/groupId>         &lt;artifactId>spring-boot-starter-parent&lt;\/artifactId>         &lt;version>2.2.0.RELEASE&lt;\/version>         &lt;relativePath\/>     &lt;\/parent>     &lt;modelVersion>4.0.0&lt;\/modelVersion>      &lt;groupId>ru.taksebe.telegram&lt;\/groupId>     &lt;artifactId>write-read&lt;\/artifactId>     &lt;version>1.0-SNAPSHOT&lt;\/version>     &lt;name>write-read&lt;\/name>     &lt;description>\u041f\u0438\u0448\u0438-\u0447\u0438\u0442\u0430\u0439&lt;\/description>     &lt;packaging>jar&lt;\/packaging>      &lt;properties>         &lt;java.version>11&lt;\/java.version>         &lt;maven.compiler.source>${java.version}&lt;\/maven.compiler.source>         &lt;maven.compiler.target>${java.version}&lt;\/maven.compiler.target>         &lt;project.build.sourceEncoding>UTF-8&lt;\/project.build.sourceEncoding>         &lt;project.reporting.outputEncoding>UTF-8&lt;\/project.reporting.outputEncoding>     &lt;\/properties>      &lt;dependencies>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-web&lt;\/artifactId>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.boot&lt;\/groupId>             &lt;artifactId>spring-boot-starter-data-redis&lt;\/artifactId>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.springframework.data&lt;\/groupId>             &lt;artifactId>spring-data-redis&lt;\/artifactId>             &lt;version>2.2.0.RELEASE&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>redis.clients&lt;\/groupId>             &lt;artifactId>jedis&lt;\/artifactId>             &lt;version>3.7.0&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.telegram&lt;\/groupId>             &lt;artifactId>telegrambots-spring-boot-starter&lt;\/artifactId>             &lt;version>5.3.0&lt;\/version>         &lt;\/dependency>         &lt;dependency>             &lt;groupId>org.projectlombok&lt;\/groupId>             &lt;artifactId>lombok&lt;\/artifactId>             &lt;version>1.18.20&lt;\/version>             &lt;scope>compile&lt;\/scope>         &lt;\/dependency>     &lt;\/dependencies>      &lt;build>         &lt;plugins>             &lt;plugin>                 &lt;groupId>org.springframework.boot&lt;\/groupId>                 &lt;artifactId>spring-boot-maven-plugin&lt;\/artifactId>                 &lt;executions>                     &lt;execution>                         &lt;goals>                             &lt;goal>build-info&lt;\/goal>                         &lt;\/goals>                         &lt;configuration>                             &lt;additionalProperties>                                 &lt;encoding.source>${project.build.sourceEncoding}&lt;\/encoding.source>                                 &lt;encoding.reporting>${project.reporting.outputEncoding}&lt;\/encoding.reporting>                                 &lt;java.source>${maven.compiler.source}&lt;\/java.source>                                 &lt;java.target>${maven.compiler.target}&lt;\/java.target>                             &lt;\/additionalProperties>                         &lt;\/configuration>                     &lt;\/execution>                 &lt;\/executions>             &lt;\/plugin>         &lt;\/plugins>     &lt;\/build> <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c Redis<\/h3>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u2014 \u043a\u043b\u0430\u0441\u0441\u044b-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0411\u0414. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043a\u043b\u044e\u0447 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0443\u044e <code>Map&lt;K,V><\/code>. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u2014 \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Word.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import lombok.*; import lombok.experimental.FieldDefaults; import org.springframework.data.annotation.Id; import org.springframework.data.redis.core.RedisHash;  import java.util.Set;  @FieldDefaults(level = AccessLevel.PRIVATE) @Getter @Setter @AllArgsConstructor @NoArgsConstructor @RedisHash(\"word\") public class Word {      @Id     String word;      \/**      * \u041e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f      *\/     Set&lt;String> mistakes;     \/\/\u0442\u0443\u0442 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b equals() \u0438 hashCode() } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u2026 \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044c  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Dictionary.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.experimental.FieldDefaults; import org.springframework.data.annotation.Id; import org.springframework.data.redis.core.RedisHash;  import java.util.List;  @FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE) @Getter @RedisHash(\"dictionary\") @Builder public class Dictionary {      @Id     String id;      List&lt;Word> wordList; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u0411\u0414 \u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043d\u0438\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0432\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u0430, \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0449\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 \u00ab\u0421\u043b\u043e\u0432\u043e\u00bb \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u0411\u0414   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">WordToBytesConverter.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.core.convert.converter.Converter; import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; import ru.taksebe.telegram.writeRead.model.Word;  import javax.annotation.Nullable;  public class WordToBytesConverter implements Converter&lt;Word, byte[]> {     private final Jackson2JsonRedisSerializer&lt;Word> serializer;      public WordToBytesConverter() {         serializer = new Jackson2JsonRedisSerializer&lt;>(Word.class);         serializer.setObjectMapper(new ObjectMapper());     }      @Override     public byte[] convert(@Nullable Word value) {         return serializer.serialize(value);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u2026 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u0411\u0414  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">BytesToWordConverter.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.core.convert.converter.Converter; import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; import ru.taksebe.telegram.writeRead.model.Word;  import javax.annotation.Nullable;  public class BytesToWordConverter implements Converter&lt;byte[], Word> {     private final Jackson2JsonRedisSerializer&lt;Word> serializer;      public BytesToWordConverter() {         serializer = new Jackson2JsonRedisSerializer&lt;>(Word.class);         serializer.setObjectMapper(new ObjectMapper());     }      @Override     public Word convert(@Nullable byte[] value) {         return serializer.deserialize(value);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0421 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">RedisConfiguration.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.springframework.boot.autoconfigure.data.redis.LettuceClientConfigurationBuilderCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.convert.RedisCustomConversions; import org.springframework.data.redis.repository.configuration.EnableRedisRepositories; import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer; import ru.taksebe.telegram.writeRead.converters.BytesToWordConverter; import ru.taksebe.telegram.writeRead.converters.WordToBytesConverter;  import java.util.Arrays;  @Configuration @EnableRedisRepositories public class RedisConfiguration {      @Bean     public LettuceClientConfigurationBuilderCustomizer lettuceClientConfigurationBuilderCustomizer() {         return clientConfigurationBuilder -> {             if (clientConfigurationBuilder.build().isUseSsl()) {                 clientConfigurationBuilder.useSsl().disablePeerVerification();             }         };     }      @Bean     public RedisTemplate&lt;?, ?> redisTemplate(RedisConnectionFactory redisConnectionFactory) {         RedisTemplate&lt;byte[], byte[]> template = new RedisTemplate&lt;>();         template.setConnectionFactory(redisConnectionFactory);         template.setKeySerializer(new StringRedisSerializer());         template.setValueSerializer(new GenericJackson2JsonRedisSerializer());         return template;     }      @Bean     public RedisCustomConversions redisCustomConversions() {         return new RedisCustomConversions(Arrays.asList(new WordToBytesConverter(),new BytesToWordConverter()));     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u041f\u0440\u0438\u0432\u044b\u043a\u0448\u0438\u043c \u043a Postgre (\u043a\u0430\u043a \u044f) \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Redis \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0431\u0438\u0432\u0448\u0438\u0439 \u043e\u0441\u043a\u043e\u043c\u0438\u043d\u0443 <code>CrudRepositoty&lt;T, ID><\/code>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0431\u0435\u0437 \u0441\u0432\u043e\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">DictionaryRepository.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import ru.taksebe.telegram.writeRead.model.Dictionary;  @Repository public interface DictionaryRepository extends CrudRepository&lt;Dictionary, String> { } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041a \u043a\u043b\u0430\u0441\u0441\u0443 <code>Word<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u044f \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d.<\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u043e\u0442\u0430<\/h3>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 <code>application.yaml<\/code> (\u0438\u043b\u0438 <code>application.properties<\/code>, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0435\u0435) \u0442\u0440\u0451\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a:<\/p>\n<ul>\n<li><code>telegram.webhookPath<\/code> \u2014 \u0430\u0434\u0440\u0435\u0441 \u0432\u0435\u0431\u0445\u0443\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 Telegram (\u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u00bb);<\/li>\n<li><code>telegram.botUsername<\/code> \u0438 <code>telegram.botToken<\/code> \u2014 \u0438\u043c\u044f \u0438 \u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0442 <a href=\"https:\/\/t.me\/BotFather\" rel=\"nofollow noopener noreferrer\">BotFather<\/a>.<\/li>\n<\/ul>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TelegramConfig.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import lombok.AccessLevel; import lombok.Getter; import lombok.experimental.FieldDefaults; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component;  @Component @Getter @FieldDefaults(level = AccessLevel.PRIVATE) public class TelegramConfig {     @Value(\"${telegram.webhook-path}\")     String webHookPath;     @Value(\"${telegram.user}\")     String userName;     @Value(\"${telegram.token}\")     String botToken; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u0431\u043e\u0442\u0430 \u0438 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0435\u0433\u043e \u043e\u0442 <code>SpringWebhookBot<\/code> \u2014   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">WriteReadBot.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; import lombok.experimental.FieldDefaults; import org.telegram.telegrambots.meta.api.methods.BotApiMethod; import org.telegram.telegrambots.meta.api.methods.send.SendMessage; import org.telegram.telegrambots.meta.api.methods.updates.SetWebhook; import org.telegram.telegrambots.meta.api.objects.CallbackQuery; import org.telegram.telegrambots.meta.api.objects.Message; import org.telegram.telegrambots.meta.api.objects.Update; import org.telegram.telegrambots.starter.SpringWebhookBot; import ru.taksebe.telegram.writeRead.constants.bot.BotMessageEnum; import ru.taksebe.telegram.writeRead.telegram.handlers.CallbackQueryHandler; import ru.taksebe.telegram.writeRead.telegram.handlers.MessageHandler;  import java.io.IOException;  @Getter @Setter @FieldDefaults(level = AccessLevel.PRIVATE) public class WriteReadBot extends SpringWebhookBot {     String botPath;     String botUsername;     String botToken;      MessageHandler messageHandler;     CallbackQueryHandler callbackQueryHandler;      public WriteReadBot(SetWebhook setWebhook, MessageHandler messageHandler,CallbackQueryHandler callbackQueryHandler) {         super(setWebhook);         this.messageHandler = messageHandler;         this.callbackQueryHandler = callbackQueryHandler;     }      @Override     public BotApiMethod&lt;?> onWebhookUpdateReceived(Update update) {         try {             return handleUpdate(update);         } catch (IllegalArgumentException e) {             return new SendMessage(update.getMessage().getChatId().toString(),                     BotMessageEnum.EXCEPTION_ILLEGAL_MESSAGE.getMessage());         } catch (Exception e) {             return new SendMessage(update.getMessage().getChatId().toString(),                     BotMessageEnum.EXCEPTION_WHAT_THE_FUCK.getMessage());         }     }      private BotApiMethod&lt;?> handleUpdate(Update update) throws IOException {         if (update.hasCallbackQuery()) {             CallbackQuery callbackQuery = update.getCallbackQuery();             return callbackQueryHandler.processCallbackQuery(callbackQuery);         } else {             Message message = update.getMessage();             if (message != null) {                 return messageHandler.answerMessage(update.getMessage());             }         }         return null;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <code>MessageHandler<\/code> \u0438 <code>CallbackQueryHandler<\/code> \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e) \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0439 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u043d\u043b\u0430\u0439\u043d-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0438\u0436\u0435, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b\u00bb).<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043b\u0430\u0441\u0441-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0442\u0438\u043f\u0430 (\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0438\u043d\u043b\u0430\u0439\u043d-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b).<\/p>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0438\u043d\u0430 \u0431\u043e\u0442\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u2014   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">SpringConfig.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import lombok.AllArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.telegram.telegrambots.meta.api.methods.updates.SetWebhook; import ru.taksebe.telegram.writeRead.telegram.WriteReadBot; import ru.taksebe.telegram.writeRead.telegram.handlers.CallbackQueryHandler; import ru.taksebe.telegram.writeRead.telegram.handlers.MessageHandler;  @Configuration @AllArgsConstructor public class SpringConfig {     private final TelegramConfig telegramConfig;      @Bean     public SetWebhook setWebhookInstance() {         return SetWebhook.builder().url(telegramConfig.getWebHookPath()).build();     }      @Bean     public WriteReadBot springWebhookBot(SetWebhook setWebhook,                                          MessageHandler messageHandler,                                          CallbackQueryHandler callbackQueryHandler) {         WriteReadBot bot = new WriteReadBot(setWebhook, messageHandler, callbackQueryHandler);          bot.setBotPath(telegramConfig.getWebHookPath());         bot.setBotUsername(telegramConfig.getUserName());         bot.setBotToken(telegramConfig.getBotToken());          return bot;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0448 \u0431\u043e\u0442 \u2014 \u044d\u0442\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0435\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u2014   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">WebhookController.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import org.telegram.telegrambots.meta.api.methods.BotApiMethod; import org.telegram.telegrambots.meta.api.objects.Update;  @RestController @AllArgsConstructor public class WebhookController {     private final WriteReadBot writeReadBot;      @PostMapping(\"\/\")     public BotApiMethod&lt;?> onUpdateReceived(@RequestBody Update update) {         return writeReadBot.onWebhookUpdateReceived(update);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041d\u0443 \u0438 \u0433\u0434\u0435-\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043c\u0435\u0442\u043e\u0434 main(), \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u043e\u0441\u044c. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0434\u043b\u044f Spring \u043a\u043b\u0430\u0441\u0441 <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">WriteReadApplication.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;  @SpringBootApplication public class WriteReadApplication {      public static void main(String[] args) {         SpringApplication.run(WriteReadApplication.class, args);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0411\u043e\u0442 \u0433\u043e\u0442\u043e\u0432, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<h3>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b<\/h3>\n<p>  \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u043d\u0430\u0448 \u0431\u043e\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432 \u2014 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u043d\u043b\u0430\u0439\u043d-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440. \u042d\u0442\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 <code>MessageHandler<\/code> \u0438 <code>CallbackQueryHandler<\/code>, \u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u0431\u043e\u0442\u0430 <code>WriteReadBot<\/code> (\u0435\u0433\u043e \u043a\u043e\u0434 \u0447\u0443\u0442\u044c \u0432\u044b\u0448\u0435, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u043e\u0442\u0430\u00bb).<\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441\u044b-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043b\u0443\u0436\u0430\u0442 \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u043c \u0437\u0432\u0435\u043d\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u0431\u043e\u0442\u043e\u043c \u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u0440\u0435\u0448\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0443 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041a\u043e\u0434 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/taksebe-official\/writeReadRightBot\/tree\/master\/src\/main\/java\/ru\/taksebe\/telegram\/writeRead\/telegram\/handlers\" rel=\"nofollow noopener noreferrer\">\u0432 \u044d\u0442\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 \u043d\u0430 Github<\/a>, \u0430 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0434\u0435\u0442\u0430\u043b\u0438 \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440 \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438.<\/p>\n<h3>\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u043e\u0442 \u044d\u0442\u043e \u043e\u043d\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/je\/w7\/as\/jew7asn3nmukw5wmipslur7sn0w.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e \u0431\u043e\u0442\u0430. \u041e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043f\u0443\u0442\u0451\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043d\u043e\u043f\u043e\u043a, \u0437\u0430\u0442\u0435\u043c \u0438\u0445 \u0440\u044f\u0434\u043e\u0432 \u0438, \u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438, \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u2014   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">ReplyKeyboardMaker.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.springframework.stereotype.Component; import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboardMarkup; import org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.KeyboardButton; import org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.KeyboardRow; import ru.taksebe.telegram.writeRead.constants.bot.ButtonNameEnum;  import java.util.ArrayList; import java.util.List;  @Component public class ReplyKeyboardMaker {      public ReplyKeyboardMarkup getMainMenuKeyboard() {         KeyboardRow row1 = new KeyboardRow();         row1.add(new KeyboardButton(ButtonNameEnum.GET_TASKS_BUTTON.getButtonName()));         row1.add(new KeyboardButton(ButtonNameEnum.GET_DICTIONARY_BUTTON.getButtonName()));          KeyboardRow row2 = new KeyboardRow();         row2.add(new KeyboardButton(ButtonNameEnum.UPLOAD_DICTIONARY_BUTTON.getButtonName()));         row2.add(new KeyboardButton(ButtonNameEnum.HELP_BUTTON.getButtonName()));          List&lt;KeyboardRow> keyboard = new ArrayList&lt;>();         keyboard.add(row1);         keyboard.add(row2);          final ReplyKeyboardMarkup replyKeyboardMarkup = new ReplyKeyboardMarkup();         replyKeyboardMarkup.setKeyboard(keyboard);         replyKeyboardMarkup.setSelective(true);         replyKeyboardMarkup.setResizeKeyboard(true);         replyKeyboardMarkup.setOneTimeKeyboard(false);          return replyKeyboardMarkup;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043d\u043e\u043f\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 <code>ButtonNameEnum<\/code> (<a href=\"https:\/\/github.com\/taksebe-official\/writeReadRightBot\/blob\/master\/src\/main\/java\/ru\/taksebe\/telegram\/writeRead\/constants\/bot\/ButtonNameEnum.java\" rel=\"nofollow noopener noreferrer\">\u043d\u0430 GitHub<\/a>), \u043d\u043e \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<p>  \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>\/start<\/code> (\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a \u0431\u043e\u0442\u0443) \u0432 \u043a\u043b\u0430\u0441\u0441\u0435-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 <code>MessageHandler<\/code>. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u0432 \u043e\u0442\u0432\u0435\u0442\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">SendMessage sendMessage = new SendMessage(&lt;id \u0447\u0430\u0442\u0430>, &lt;\u0442\u0435\u043a\u0441\u0442 \u043e\u0442\u0432\u0435\u0442\u0430>); sendMessage.setReplyMarkup(replyKeyboardMaker.getMainMenuKeyboard()); return sendMessage; <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <code>MessageHandler<\/code> \u043d\u0430\u0434\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043a\u043d\u043e\u043f\u043e\u043a \u2014 \u043d\u0430\u0448 \u0431\u043e\u0442 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043e\u0439.<\/p>\n<h3>\u0418\u043d\u043b\u0430\u0439\u043d-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b<\/h3>\n<p>  \u042d\u0442\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/na\/gj\/t-\/nagjt-eqitopfz1z8cpvek3v8us.png\"\/><\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0431\u043e\u0442\u0435 \u0438\u043d\u043b\u0430\u0439\u043d-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c\u0438\u00bb \u0438 \u00ab\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c\u00bb. \u0421\u043e\u0441\u0442\u0430\u0432 \u043a\u043d\u043e\u043f\u043e\u043a \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u2014 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u00ab\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c\u00bb \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0428\u0430\u0431\u043b\u043e\u043d\u00bb. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0432\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0431\u0435\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0412\u0430\u0448 \u0441\u043b\u043e\u0432\u0430\u0440\u044c\u00bb.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430, \u0438\u043d\u043b\u0430\u0439\u043d-\u0432\u0435\u0440\u0441\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">InlineKeyboardMaker.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.springframework.stereotype.Component; import org.telegram.telegrambots.meta.api.objects.replykeyboard.InlineKeyboardMarkup; import org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.InlineKeyboardButton; import ru.taksebe.telegram.writeRead.constants.bot.CallbackDataPartsEnum; import ru.taksebe.telegram.writeRead.constants.resources.DictionaryResourcePathEnum;  import java.util.ArrayList; import java.util.List;  @Component public class InlineKeyboardMaker {      public InlineKeyboardMarkup getInlineMessageButtonsWithTemplate(String prefix, boolean isUserDictionaryNeed) {         InlineKeyboardMarkup inlineKeyboardMarkup = getInlineMessageButtons(prefix, isUserDictionaryNeed);         inlineKeyboardMarkup.getKeyboard().add(getButton(                 \"\u0428\u0430\u0431\u043b\u043e\u043d\",                 prefix + CallbackDataPartsEnum.TEMPLATE.name()         ));         return inlineKeyboardMarkup;     }      public InlineKeyboardMarkup getInlineMessageButtons(String prefix, boolean isUserDictionaryNeed) {         List&lt;List&lt;InlineKeyboardButton>> rowList = new ArrayList&lt;>();          for (DictionaryResourcePathEnum dictionary : DictionaryResourcePathEnum.values()) {             rowList.add(getButton(                     dictionary.getButtonName(),                     prefix + dictionary.name()             ));         }          if (!rowList.isEmpty()) {             rowList.add(getButton(                     \"\u0412\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b\",                     prefix + CallbackDataPartsEnum.ALL_GRADES.name()             ));         }          if (isUserDictionaryNeed) {             rowList.add(getButton(                     \"\u0412\u0430\u0448 \u0441\u043b\u043e\u0432\u0430\u0440\u044c\",                     prefix + CallbackDataPartsEnum.USER_DICTIONARY.name()             ));         }          InlineKeyboardMarkup inlineKeyboardMarkup = new InlineKeyboardMarkup();         inlineKeyboardMarkup.setKeyboard(rowList);         return inlineKeyboardMarkup;     }      private List&lt;InlineKeyboardButton> getButton(String buttonName, String buttonCallBackData) {         InlineKeyboardButton button = new InlineKeyboardButton();         button.setText(buttonName);         button.setCallbackData(buttonCallBackData);          List&lt;InlineKeyboardButton> keyboardButtonsRow = new ArrayList&lt;>();         keyboardButtonsRow.add(button);         return keyboardButtonsRow;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440, \u0438\u043d\u043b\u0430\u0439\u043d-\u043a\u043d\u043e\u043f\u043a\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 (\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0438\u0434\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c), \u043d\u043e \u0438 \u043e\u0442\u0432\u0435\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043d\u0435\u0451.<\/p>\n<p>  \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043d\u043b\u0430\u0439\u043d-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0432 \u0446\u0435\u043b\u043e\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">SendMessage sendMessage = new SendMessage(&lt;id \u0447\u0430\u0442\u0430>, &lt;\u0442\u0435\u043a\u0441\u0442 \u043e\u0442\u0432\u0435\u0442\u0430>); sendMessage.setReplyMarkup(inlineKeyboardMaker.getInlineMessageButtons(&lt;\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u043e\u0439>)); return sendMessage; <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432<\/h3>\n<p>  \u041d\u0430\u0448 \u0431\u043e\u0442 \u0443\u043c\u0435\u0435\u0442 \u043a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e REST-\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 Telegram \u2014 <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TelegramApiClient.java<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import org.springframework.beans.factory.annotation.Value; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.ByteArrayResource; import org.springframework.http.*; import org.springframework.stereotype.Service; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.StreamUtils; import org.springframework.web.client.RestTemplate; import org.telegram.telegrambots.meta.api.objects.ApiResponse; import ru.taksebe.telegram.writeRead.exceptions.TelegramFileNotFoundException; import ru.taksebe.telegram.writeRead.exceptions.TelegramFileUploadException;  import java.io.File; import java.io.FileOutputStream; import java.text.MessageFormat; import java.util.Objects;  @Service public class TelegramApiClient {     private final String URL;     private final String botToken;      private final RestTemplate restTemplate;      public TelegramApiClient(@Value(\"${telegram.api-url}\") String URL,                              @Value(\"${telegram.token}\") String botToken) {         this.URL = URL;         this.botToken = botToken;         this.restTemplate = new RestTemplate();     }      public void uploadFile(String chatId, ByteArrayResource value) {         LinkedMultiValueMap&lt;String, Object> map = new LinkedMultiValueMap&lt;>();         map.add(\"document\", value);          HttpHeaders headers = new HttpHeaders();         headers.setContentType(MediaType.MULTIPART_FORM_DATA);          HttpEntity&lt;LinkedMultiValueMap&lt;String, Object>> requestEntity = new HttpEntity&lt;>(map, headers);          try {             restTemplate.exchange(                     MessageFormat.format(\"{0}bot{1}\/sendDocument?chat_id={2}\", URL, botToken, chatId),                     HttpMethod.POST,                     requestEntity,                     String.class);         } catch (Exception e) {             throw new TelegramFileUploadException();         }     }      public File getDocumentFile(String fileId) {         try {             return restTemplate.execute(                     Objects.requireNonNull(getDocumentTelegramFileUrl(fileId)),                     HttpMethod.GET,                     null,                     clientHttpResponse -> {                         File ret = File.createTempFile(\"download\", \"tmp\");                         StreamUtils.copy(clientHttpResponse.getBody(), new FileOutputStream(ret));                         return ret;                     });         } catch (Exception e) {             throw new TelegramFileNotFoundException();         }     }      private String getDocumentTelegramFileUrl(String fileId) {         try {             ResponseEntity&lt;ApiResponse&lt;org.telegram.telegrambots.meta.api.objects.File>> response = restTemplate.exchange(                     MessageFormat.format(\"{0}bot{1}\/getFile?file_id={2}\", URL, botToken, fileId),                     HttpMethod.GET,                     null,                     new ParameterizedTypeReference&lt;ApiResponse&lt;org.telegram.telegrambots.meta.api.objects.File>>() {                     }             );             return Objects.requireNonNull(response.getBody()).getResult().getFileUrl(this.botToken);         } catch (Exception e) {             throw new TelegramFileNotFoundException();         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041c\u0435\u0442\u043e\u0434\u044b \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u0445 <code>MessageHandler<\/code> \u0438 <code>CallbackQueryHandler<\/code>.<\/p>\n<p>  \u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <code>ByteArrayResource<\/code> \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0432\u0438\u0434\u0430:<br \/>  <code>https:\/\/api.telegram.org\/bot&lt;\u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430>\/sendDocument?chat_id=&lt;id \u0447\u0430\u0442\u0430><\/code><\/p>\n<p>  \u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Document<\/code> \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0444\u0430\u0439\u043b\u0430. \u0427\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c GET-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0432\u0438\u0434\u0430:<br \/>  <code>https:\/\/api.telegram.org\/bot&lt;\u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430>\/getFile?file_id=&lt;id \u0444\u0430\u0439\u043b\u0430><\/code><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 <code>File<\/code> \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 <code>org.telegram.telegrambots.meta.api.objects<\/code>, \u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 <code>java.io.File<\/code>.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Heroku Redis \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/h3>\n<p>  \u0418\u0434\u0451\u043c \u043d\u0430 <a href=\"https:\/\/heroku.com\" rel=\"nofollow noopener noreferrer\">Heroku<\/a> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c:<\/p>\n<ul>\n<li>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f (\u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430)<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u043d\u0430\u0436\u0430\u0442\u044c \u00abNew\u00bb\/\u00abCreate new app\u00bb \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u0430<\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u00abResources\u00bb<\/li>\n<li>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00abAdd-ons\u00bb \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u00abHeroku Redis\u00bb, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0435\u0451 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043f\u043e\u0438\u0441\u043a\u0430<\/li>\n<li>\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0411\u0414 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443<\/li>\n<li>\u0412 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u0438\u043a\u043e\u043d\u043a\u0443 \u0432 \u0432\u0438\u0434\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0438\u0437 \u0441\u0438\u043d\u0438\u0445 \u0442\u043e\u0447\u0435\u043a, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u043d\u043a\u0442 Data, \u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u0441\u043f\u0438\u0441\u043a\u0435 \u0431\u0430\u0437 \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e. \u041f\u0435\u0440\u0432\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442\u044c \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443<\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u00abSettings\u00bb<\/li>\n<li>\u041d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abView credentials\u00bb \u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u0430<\/li>\n<li>\u0412\u0443\u0430\u043b\u044f, \u043f\u0435\u0440\u0435\u0434 \u0412\u0430\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414<\/li>\n<\/ul>\n<p>  \u041d\u0430\u0434\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Heroku \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044f\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u043e\u0432\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0412\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<p>  \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c <code>application.yaml<\/code>:<br \/>  <code>spring.redis.database: 0<br \/>  spring.redis.host: &lt;\u0445\u043e\u0441\u0442 \u0411\u0414 Redis, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441 Heroku><br \/>  spring.redis.port: &lt;\u043f\u043e\u0440\u0442 \u0411\u0414 Redis, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441 Heroku><br \/>  spring.redis.password: &lt;\u043f\u0430\u0440\u043e\u043b\u044c \u0411\u0414 Redis, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441 Heroku><br \/>  spring.redis.ssl: true<\/code><\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e<\/h3>\n<p>  \u041d\u0430\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0435\u0431\u0445\u0443\u043a \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 Telegram.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <a href=\"https:\/\/ngrok.com\/\" rel=\"nofollow noopener noreferrer\">ngrok<\/a> \u043f\u043e \u0432\u043e\u0442 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/pavelpage.ru\/koderstvo\/nastroyka-ngrok-dlya-otladki-telegram-bota.html\" rel=\"nofollow noopener noreferrer\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 <code>application.yaml<\/code> \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <code>telegram.webhook-path<\/code> (\u0432\u044b\u0434\u0430\u0441\u0442 ngrok) \u0438 <code>server.port<\/code> (\u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f ngrok \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430)<\/p>\n<p>  \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a \u0432 Telegram, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0438\u0434\u0430:<br \/>  <code>https:\/\/api.telegram.org\/bot&lt;\u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430>\/setWebhook?url=&lt;URL, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0442 ngrok><\/code><\/p>\n<p>  \u2026 \u0432\u0438\u0434\u0438\u043c \u043e\u0442\u0432\u0435\u0442:<br \/>  <code>{\"ok\":true,\"result\":true,\"description\":\"Webhook was set\"}<\/code><\/p>\n<p>  \u2026 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0432\u043e\u0435\u0439 IDE!<\/p>\n<h3>\u0414\u0435\u043f\u043b\u043e\u0438\u043c \u043d\u0430 Heroku<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f Java, \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043e\u0442 8, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>system.properties<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<br \/>  <code>java.runtime.version=11<\/code><\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043b\u044f Heroku \u0444\u0430\u0439\u043b <code>Procfile<\/code> \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code>pom.xml<\/code>.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c\/\u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 <code>application.yaml<\/code> \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0411\u0414 \u2014 \u043e\u043d\u0430 \u043f\u043e\u0434\u0446\u0435\u043f\u0438\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043d\u0430 Heroku. \u0415\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0432\u0435\u0434\u0451\u0442\u0441\u044f, \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u044d\u0442\u043e\u0439 \u0411\u0414.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435:  <\/p>\n<ul>\n<li>\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 <code>heroku create &lt;\u0438\u043c\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f><\/code> (\u043b\u0438\u0431\u043e <code>heroku git:remote -a &lt;\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430><\/code>, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Heroku \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435)<\/li>\n<li>\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Heroku \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0411\u0414 Heroku Redis (\u0435\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u044d\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0448\u0435, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u00bb)<\/li>\n<li>\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 <code>mvn clean install<\/code><\/li>\n<li>\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 <code>git push heroku master<\/code><\/li>\n<li>\u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 <code>heroku ps:scale web=1<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 (dynos) \u0434\u043b\u044f \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 web<\/li>\n<li>\u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abOpen app\u00bb \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Heroku, \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u043e\u0441\u044c (\u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u00abWhitelabel Error Page\u00bb \u2014 \u0437\u043d\u0430\u0447\u0438\u0442, \u0443\u0441\u043f\u0435\u0445)<\/li>\n<li>\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0431\u0445\u0443\u043a \u0432 Telegram (\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0448\u0435, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u00bb), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f URL \u0438\u0437 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0431\u043e\u0442\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 Telegram!<\/p>\n<p>  \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Heroku \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u00abDeploy\u00bb \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u0430 GitHub-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 (\u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0438\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438).<\/p>\n<h3>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0434\u0435\u043b\u0430\u0442\u044c<\/h3>\n<p>  \u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, Heroku \u0433\u0430\u0441\u0438\u0442 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u043e\u0442 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 8-10 \u0441\u0435\u043a\u0443\u043d\u0434 \u2014 \u043e\u043d \u0436\u0434\u0451\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u043c \u0442\u0430\u0440\u0438\u0444\u0435 \u0445\u043e\u0441\u0442\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 \u0432 \u0442\u0430\u0440\u0438\u0444\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043f\u0442\u0430\u0439\u043c\u0430.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0438\u043d\u0433 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e Google, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u044a\u0435\u0434\u0430\u0442\u044c \u043b\u044c\u0432\u0438\u043d\u0443\u044e \u0434\u043e\u043b\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u0442\u0430\u0440\u0438\u0444\u0430. \u042f \u0436\u0430\u0434\u043d\u044b\u0439, \u044f \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443.<\/p>\n<h3>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043a \u043f\u0440\u043e <a href=\"https:\/\/youtu.be\/wZGI4w9K5XY\" rel=\"nofollow noopener noreferrer\">\u041f\u0438\u0448\u0438\u0427\u0438\u0442\u0430\u044f<\/a> \u0442\u043e\u0436\u0435 \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u043b.<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><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\/646017\/\"> https:\/\/habr.com\/ru\/post\/646017\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/v9\/mj\/xn\/v9mjxnpeteb00fprvqucr_lmxng.png\"\/><\/p>\n<h3>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0435\u0440\u0438\u044f\u0445<\/h3>\n<p>  \u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432 \u043c\u043e\u0435\u0439 \u0441\u0435\u0440\u0438\u0438 \u00ab\u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445\u00bb \u2014 <a href=\"https:\/\/habr.com\/ru\/post\/528694\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f<\/a> \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u00ab\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443\u00bb Telegram-\u0431\u043e\u0442\u0443, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u043c\u0443 \u043e\u0442 <code>TelegramLongPollingBot<\/code>.<\/p>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 Telegram-\u0431\u043e\u0442\u043e\u0432 \u043d\u0430 Java \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u2014 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441. \u0412 \u043d\u0435\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0438 \u0441 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043a\u0430\u043a \u043c\u0430\u043d\u0443\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043a\u0435\u043b\u0435\u0442\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435.<\/p>\n<p>  \u042f \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u0434\u043b\u044f \u0441\u0435\u0431\u044f, \u0430 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0443\u043c\u043d\u044b\u0445 \u2014 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u044a\u0435\u0445\u0430\u0442\u044c \u0432 \u0442\u0435\u043c\u0443.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>  \u0423\u0447\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u2014 \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0447\u043d\u043e\u0435, \u0430 \u0435\u0441\u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043b\u043e\u0431, \u0435\u0449\u0451 \u0438 \u043c\u0430\u043b\u043e\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u0447\u0435\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/on\/sa\/jg\/onsajg8bdnbkymxj0nflhpv92q4.png\"\/><\/p>\n<p>  \u0420\u0435\u0431\u0451\u043d\u043e\u043a \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c. \u041f\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f\u043c, \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u0438\u0434\u0451\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e. \u0414\u0435\u043b\u043e \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u0442\u0430 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0439.  <\/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-328227","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328227","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=328227"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328227\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}