{"id":288967,"date":"2018-09-04T17:30:02","date_gmt":"2018-09-04T13:30:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=288967"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2018-09-04T13:30:02","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=288967","title":{"rendered":"\u041e\u0434\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043d\u0430 Kotlin \u0438 SpringBoot \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f JSP"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/422083\/\" class=\"post__text post__text-html js-mediator-article\">\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<p><b>\u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u043e\u0433\u0435\u0440, \u043a\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0443\u043c\u0435\u0435\u0442<\/b><br \/>  \u042f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u0433\u0443\u0440\u0443 \u0438\u043b\u0438 \u043a\u0440\u0443\u0442\u044b\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c \u043d\u0438 \u0432 \u041a\u043e\u0442\u043b\u0438\u043d\u0435, \u043d\u0438 \u0432 Spring, \u043d\u0438 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u042f \u043e\u0431\u044b\u0447\u043d\u044b\u0439 java junior, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0448\u0438\u043b \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c kotlin. \u0412\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 &#171;\u0421\u0430\u043f\u0441\u0430\u043d\u0435&#187; \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435 \u043f\u043e \u0434\u043e\u0440\u043e\u0433\u0435 \u0441 <a href=\"https:\/\/techtrain.ru\/\">techtrain<\/a> <\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f java \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e \u043a\u043e\u0442\u043b\u0438\u043d, \u043d\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u0435\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u043b\u0438<\/p>\n<p>  <\/p>\n<h3>\u0414\u043b\u044f \u0447\u0435\u0433\u043e<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e kotlin \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 spring boot, \u0430 \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 DSL \u0432 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 html \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 jsp.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f spring boot<\/h3>\n<p>  <\/p>\n<p>\u0422\u0443\u0442 \u0432\u0441\u0435 \u043c\u0430\u043b\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 java<\/p>\n<p>  <\/p>\n<ol>\n<li> \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 (kotlin)<\/li>\n<li> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c repository jcenter, dependency \u043d\u0430 kotlin-stdlib \u0438 spring-boot-starter-web, \u043f\u043b\u0430\u0433\u0438\u043d kotlin-maven-plugin<\/li>\n<li> \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b, \u0438\u043d\u0430\u0447\u0435 Spring \u0441\u0432\u0430\u043b\u0438\u0442\u0441\u044f<\/li>\n<li> \u0421\u043e\u0437\u0434\u0430\u0442\u044c open \u043a\u043b\u0430\u0441\u0441 Application <\/li>\n<li> \u0412 Application \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 main \u0441\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 <i>runApplication &lt;Application&gt;(*args)<\/i> <\/li>\n<li> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 HelloWorld, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u0438\u0440\u0443 <\/li>\n<\/ol>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"spoiler\"><b class=\"spoiler_title\">pom.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt; &lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\"          xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"          xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;     &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;      &lt;groupId&gt;com.example&lt;\/groupId&gt;     &lt;artifactId&gt;habr-sample&lt;\/artifactId&gt;     &lt;version&gt;1.0-SNAPSHOT&lt;\/version&gt;     &lt;repositories&gt;         &lt;repository&gt;             &lt;id&gt;jcenter&lt;\/id&gt;             &lt;name&gt;jcenter&lt;\/name&gt;             &lt;url&gt;https:\/\/jcenter.bintray.com&lt;\/url&gt;         &lt;\/repository&gt;     &lt;\/repositories&gt;      &lt;build&gt;         &lt;plugins&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.jetbrains.kotlin&lt;\/groupId&gt;                 &lt;artifactId&gt;kotlin-maven-plugin&lt;\/artifactId&gt;                 &lt;version&gt;RELEASE&lt;\/version&gt;                 &lt;executions&gt;                     &lt;execution&gt;                         &lt;id&gt;compile&lt;\/id&gt;                         &lt;phase&gt;compile&lt;\/phase&gt;                         &lt;goals&gt;                             &lt;goal&gt;compile&lt;\/goal&gt;                         &lt;\/goals&gt;                     &lt;\/execution&gt;                 &lt;\/executions&gt;                 &lt;configuration&gt;                     &lt;jvmTarget&gt;1.8&lt;\/jvmTarget&gt;                 &lt;\/configuration&gt;             &lt;\/plugin&gt;         &lt;\/plugins&gt;     &lt;\/build&gt;      &lt;dependencies&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.jetbrains.kotlin&lt;\/groupId&gt;             &lt;artifactId&gt;kotlin-stdlib&lt;\/artifactId&gt;             &lt;version&gt;RELEASE&lt;\/version&gt;         &lt;\/dependency&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;             &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;             &lt;version&gt;RELEASE&lt;\/version&gt;         &lt;\/dependency&gt;     &lt;\/dependencies&gt; &lt;\/project&gt;<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043b\u0430\u0441\u0441\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>package example  import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.runApplication  @SpringBootApplication open class Application  fun main(args: Array&lt;String&gt;) {     runApplication&lt;Application&gt;(*args) }<\/code><\/pre>\n<p>  <\/p>\n<pre><code>package example  import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.ResponseBody  @Controller class HelloWorld{     @RequestMapping(\"\/\")     @ResponseBody     fun mainPage(): String {         return \"\u041f\u0440\u0438\u0432\u0435\u0442 \u0425\u0430\u0431\u0440\"     } }<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c kotlinx.html<\/h3>\n<p>  <\/p>\n<p>Kotlin \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 DSL \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 html. \u041e\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043c\u0435\u0448\u0430\u0442\u044c \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 html c \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. <\/p>\n<p>  <\/p>\n<pre><code>table {\/\/\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0433\u0430     thead{         tr {             td {                 +\"\u0418\u043c\u044f\" \/\/+ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442             }             td {                 +\"\u0412\u043e\u0437\u0440\u0430\u0441\u0442\"             }         }     }     for (person in PersonGenerator().generate()) { \/\/\u041e\u0431\u044b\u0447\u043d\u044b\u0439 for \u0438\u0437 kotlin         tr {              td {                 +person.name             }             td {                 text(person.age)  \/\/\u0430\u043d\u0430\u043b\u043e\u0433 \"+\" \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e String             }         }      } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 html \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0430 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u043b\u044e\u0434\u0435\u0439 \u0438 \u0438\u0445 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043e\u043c<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1k\/4h\/1z\/1k4h1zkeukhftbhs38j9k5yxl-g.png\"><\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"spoiler\"><b class=\"spoiler_title\">pom.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt; &lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\"          xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"          xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;     &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;      &lt;groupId&gt;com.example&lt;\/groupId&gt;     &lt;artifactId&gt;habr-sample&lt;\/artifactId&gt;     &lt;version&gt;1.0-SNAPSHOT&lt;\/version&gt;     &lt;repositories&gt;         &lt;repository&gt;             &lt;id&gt;jcenter&lt;\/id&gt;             &lt;name&gt;jcenter&lt;\/name&gt;             &lt;url&gt;https:\/\/jcenter.bintray.com&lt;\/url&gt;         &lt;\/repository&gt;     &lt;\/repositories&gt;      &lt;build&gt;         &lt;plugins&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.jetbrains.kotlin&lt;\/groupId&gt;                 &lt;artifactId&gt;kotlin-maven-plugin&lt;\/artifactId&gt;                 &lt;version&gt;RELEASE&lt;\/version&gt;                 &lt;executions&gt;                     &lt;execution&gt;                         &lt;id&gt;compile&lt;\/id&gt;                         &lt;phase&gt;compile&lt;\/phase&gt;                         &lt;goals&gt;                             &lt;goal&gt;compile&lt;\/goal&gt;                         &lt;\/goals&gt;                     &lt;\/execution&gt;                 &lt;\/executions&gt;                 &lt;configuration&gt;                     &lt;jvmTarget&gt;1.8&lt;\/jvmTarget&gt;                 &lt;\/configuration&gt;             &lt;\/plugin&gt;         &lt;\/plugins&gt;     &lt;\/build&gt;      &lt;dependencies&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.jetbrains.kotlin&lt;\/groupId&gt;             &lt;artifactId&gt;kotlin-stdlib-jdk8&lt;\/artifactId&gt;             &lt;version&gt;RELEASE&lt;\/version&gt;         &lt;\/dependency&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;             &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;             &lt;version&gt;RELEASE&lt;\/version&gt;         &lt;\/dependency&gt;         &lt;dependency&gt;             &lt;groupId&gt;org.jetbrains.kotlinx&lt;\/groupId&gt;             &lt;artifactId&gt;kotlinx-html-jvm&lt;\/artifactId&gt;             &lt;version&gt;RELEASE&lt;\/version&gt;         &lt;\/dependency&gt;     &lt;\/dependencies&gt; &lt;\/project&gt;<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043b\u0430\u0441\u0441\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>package example  data class Person(val name: String,var age: Int)<\/code><\/pre>\n<p>  <\/p>\n<pre><code>package example import java.util.* import kotlin.collections.ArrayList  class PersonGenerator{     private val nameList = arrayOf(\"\u041f\u0435\u0442\u044f\", \"\u0412\u0430\u0441\u044f\", \"\u0416\u0435\u043d\u044f\", \"\u041c\u0430\u0440\u043a\", \"\u0418\u0432\u0430\u043d\", \"\u041b\u0435\u043e\u043f\u043e\u043b\u044c\u0434\");     fun generate(): List&lt;Person&gt; {         val random = Random()         val personList = ArrayList&lt;Person&gt;()         for (i in 1..15) {             personList.add(Person(nameList.get(random.nextInt(nameList.size)), random.nextInt(30) + 18))         }         return personList;     } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code>package example import kotlinx.html.* import kotlinx.html.stream.createHTML import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.ResponseBody  @Controller class HelloWorld {      @RequestMapping(\"\/\")     @ResponseBody     fun mainPage(): String {         return createHTML()                 .html {                     body {                         table {                             thead() {                                 tr {                                     td {                                         +\"\u0418\u043c\u044f\"                                     }                                     td {                                         +\"\u0412\u043e\u0437\u0440\u0430\u0441\u0442\"                                     }                                 }                             }                             val personList= PersonGenerator().generate()                             for (person in personList ) {                                 tr {                                      td {                                         +person.name                                     }                                     td {                                         text(person.age)                                     }                                 }                              }                         }                     }                 }     }  } <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c css<\/h3>\n<p>  <\/p>\n<p>Kotlinx.html \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 css, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0438\u043b\u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e unsafe. \u0412\u0441\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Aza-Kotlin-CSS \u2014 DSL \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 css<\/p>\n<p>  <\/p>\n<pre><code>head { \/\/\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u0435\u0439 bootstrap     styleLink(\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.1.3\/css\/bootstrap.min.css\")     styleLink(\"https:\/\/cdn.datatables.net\/1.10.19\/css\/dataTables.bootstrap4.min.css\") \/\/\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0442\u0438\u043b\u044f     style(\"text\/css\") {         unsafe {\/\/ \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 unsafe kotlinx.html             raw(                     Stylesheet { \/\/ \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0438\u043b\u044c \u0441 Aza-Kotlin-CSS                         table and td and th {                             color = 0xFC0Fc0                         }                     }.render()             )         }     }     meta {         charset = \"utf-8\"     }  }<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pp\/x-\/vh\/ppx-vheaitzjypmizvjtsjp7rbu.png\"><\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 js \u0438\u0434\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 unsafe<\/p>\n<p>  <\/p>\n<h3 id=\"rezyume\">\u0420\u0435\u0437\u044e\u043c\u0435<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043f\u0438\u0441\u0430\u0442\u044c view \u043d\u0430 DSL \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 JSP. \u041c\u043d\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043b\u0435\u0437\u0442\u044c \u0432 \u0431\u0430\u0437\u0443, \u043a\u043b\u0430\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0443 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u0432 jsp. \u042f \u043c\u043e\u0433\u0443 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439 jsp \u0438\u0437 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u0438\u043d\u0443\u044f \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043d\u0435 \u0441\u043b\u043e\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b jsp \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0432\u043e\u0438\u0445 pet-project \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0444\u0440\u043e\u043d\u0442\u043e\u043c. \u041c\u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u043e\u0432 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443.<\/p>\n<p>  <\/p>\n<h4 id=\"poleznye-ssylki\">\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h4>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/MEJIOMAH17\/kotlinExample\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u043e\u0437\u043e\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0438 <\/a><br \/>  <a href=\"https:\/\/kotlinlang.org\/docs\/reference\/\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043e\u0442\u043b\u0438\u043d\u0443<\/a><br \/>  <a href=\"https:\/\/spring.io\/guides\/tutorials\/spring-boot-kotlin\/\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f spring boot \u043a \u043a\u043e\u0442\u043b\u0438\u043d\u0443<\/a><br \/>  <a href=\"https:\/\/github.com\/kotlin\/kotlinx.html\/wiki\/Getting-started\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e kotlinx.html<\/a><br \/>  <a href=\"https:\/\/github.com\/olegcherr\/Aza-Kotlin-CSS\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e Aza-Kotlin-CSS<\/a><\/p>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/422083\/\"> https:\/\/habr.com\/post\/422083\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/422083\/\" class=\"post__text post__text-html js-mediator-article\">\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<p><b>\u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u043e\u0433\u0435\u0440, \u043a\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0443\u043c\u0435\u0435\u0442<\/b><br \/>  \u042f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u0433\u0443\u0440\u0443 \u0438\u043b\u0438 \u043a\u0440\u0443\u0442\u044b\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c \u043d\u0438 \u0432 \u041a\u043e\u0442\u043b\u0438\u043d\u0435, \u043d\u0438 \u0432 Spring, \u043d\u0438 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u042f \u043e\u0431\u044b\u0447\u043d\u044b\u0439 java junior, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0448\u0438\u043b \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c kotlin. \u0412\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 &#171;\u0421\u0430\u043f\u0441\u0430\u043d\u0435&#187; \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435 \u043f\u043e \u0434\u043e\u0440\u043e\u0433\u0435 \u0441 <a href=\"https:\/\/techtrain.ru\/\">techtrain<\/a> <\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u0414\u043b\u044f \u043a\u043e\u0433\u043e<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f java \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e \u043a\u043e\u0442\u043b\u0438\u043d, \u043d\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u0435\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u043b\u0438<\/p>\n<p>  <\/p>\n<h3>\u0414\u043b\u044f \u0447\u0435\u0433\u043e<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e kotlin \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 spring boot, \u0430 \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 DSL \u0432 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 html \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 jsp.<\/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-288967","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/288967","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=288967"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/288967\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=288967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=288967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=288967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}