{"id":322913,"date":"2021-05-11T15:01:12","date_gmt":"2021-05-11T15:01:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=322913"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=322913","title":{"rendered":"Spring Fu 0.3.0 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u0414\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0443\u0447\u0430\u0449\u0438\u0445\u0441\u044f \u043d\u0430 \u043a\u0443\u0440\u0441\u0435 <a href=\"https:\/\/otus.pw\/B3bW\/\"><strong>&#171;Kotlin Backend Developer<\/strong><\/a><strong>&#171;<\/strong> \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u0435\u043c\u043e-\u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/4C0O\/\"><strong>\u00ab\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 GraphQL \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u044d\u043a\u0435\u043d\u0434 \u043d\u0430 Kotlin\u00bb. <\/strong><\/a>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043e\u0431\u0437\u043e\u0440 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 GraphQL, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f Kotlin \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 ktor \u0438 graphql-kotlin.  <\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/196\/4d8\/f6c\/1964d8f6c6799589a3de14b028aec408.png\" width=\"780\" height=\"439\"><figcaption><\/figcaption><\/figure>\n<hr>\n<p>\u0421\u043f\u0435\u0448\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0434\u043e\u0441\u0442\u043d\u043e\u0439 \u043d\u043e\u0432\u043e\u0441\u0442\u044c\u044e&nbsp;\u2014 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0432\u044b\u0448\u0435\u043b <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/\"><u>Spring Fu<\/u><\/a> \u0432\u0435\u0440\u0441\u0438\u0438 0.3.0. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043d\u043a\u0443\u0431\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Domain-specific_language\"><u>DSL<\/u><\/a>. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h3>JaFu \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f!<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/tree\/master\/jafu\"><u>JaFu<\/u><\/a> (DSL Java) \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/tree\/master\/kofu\"><u>KoFu<\/u><\/a> (DSL Kotlin). \u042f \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 JaFu \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 0.1.0, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0432\u0443\u0445 DSL&nbsp;\u2014 Java \u0438 Kotlin. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f API, \u044f \u043d\u0435 \u0431\u044b\u043b \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430 Java \u0441\u0442\u043e\u0438\u043b \u043c\u043e\u0438\u0445 \u0443\u0441\u0438\u043b\u0438\u0439, \u043d\u043e \u044f \u043f\u0435\u0440\u0435\u0434\u0443\u043c\u0430\u043b \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<ul>\n<li>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>Java \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>JaFu \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u043e \u0438 \u0434\u043b\u044f Kotlin-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 JVM \u0438 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-graalvm-native\"><u>\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 GraalVM<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041a \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430:&nbsp;<a href=\"https:\/\/spring.io\/team\/aneveu\"><u>\u041e\u0434\u0440\u0438 \u041d\u0435\u0432\u0435 (Audrey Neveu)<\/u><\/a> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0434 KoFu, \u0430 <a href=\"https:\/\/spring.io\/team\/apoutsma\"><u>\u0410\u0440\u044c\u0435\u043d \u041f\u0443\u0442\u0441\u043c\u0430 (Arjen Poutsma)<\/u><\/a>&nbsp;\u2014 \u043d\u0430\u0434 JaFu. \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c!<\/p>\n<\/li>\n<\/ul>\n<h4>\u0414\u0440\u0443\u0433\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043b\u0438\u043d\u0438\u044e <a href=\"https:\/\/spring.io\/blog\/2020\/05\/15\/spring-boot-2-3-0-available-now\"><u>Spring Boot 2.3.0<\/u><\/a> \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c API. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/milestone\/8?closed=1\"><u>\u0442\u0443\u0442<\/u><\/a>.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 Spring Fu 0.3.0 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0431-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043c\u043e\u0435\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 OpenJDK 11 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e: Started Application in 0.673 seconds (JVM running for 0.898).<\/p>\n<h4>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 JaFu \u0438 Kofu<\/h4>\n<p>Spring MVC \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a\u0430\u043a \u0434\u043b\u044f Java, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f Kotlin. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Spring Boot, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u0438\u0445 DSL.<\/p>\n<p>\u041d\u0430 JaFu:<\/p>\n<pre><code class=\"kotlin\">public class Application {  \tpublic static JafuApplication app = webApplication(a -&gt; a.beans(b -&gt; b \t\t.bean(SampleHandler.class) \t\t.bean(SampleService.class)) \t\t.enable(webMvc(w -&gt; w \t\t\t.port(w.profiles().contains(\"test\") ? 8181 : 8080) \t\t\t.router(router -&gt; { \t\t\t\tSampleHandler handler = w.ref(SampleHandler.class); \t\t\t\trouter \t\t\t\t\t.GET(\"\/\", handler::hello) \t\t\t\t\t.GET(\"\/api\", handler::json); \t\t\t}).converters(c -&gt; c \t\t\t\t.string() \t\t\t\t.jackson(j -&gt; j.indentOutput(true))))));  \tpublic static void main (String[] args) { \t\tapp.run(args); \t} }<\/code><\/pre>\n<p>\u041d\u0430 KoFu:<\/p>\n<pre><code class=\"kotlin\">val app = webApplication { \tbeans { \t\tbean&lt;SampleService&gt;() \t\tbean&lt;SampleHandler&gt;() \t} \twebMvc { \t\tport = if (profiles.contains(\"test\")) 8181 else 8080 \t\trouter { \t\t\tval handler = ref&lt;SampleHandler&gt;() \t\t\tGET(\"\/\", handler::hello) \t\t\tGET(\"\/api\", handler::json) \t\t} \t\tconverters { \t\t\tstring() \t\t\tjackson { \t\t\t\tindentOutput = false \t\t\t} \t\t} \t} }  fun main() { \tapp.run() }<\/code><\/pre>\n<h4>\u0421\u0440\u0435\u0437\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0412\u0441\u044f \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0437\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u0442\u0440\u0438 \u0441\u0440\u0435\u0437\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>webConfig<\/code>,&nbsp;<code>loggingConfig<\/code>&nbsp;\u0438 <code>myFeatureConfig<\/code>:<\/p>\n<pre><code class=\"kotlin\">val webConfig = configuration {     webMvc {         \/\/ ...     } }  val loggingConfig = configuration {     logging {         level = LogLevel.WARN     } }  val myFeatureConfig = configuration {     beans {         \/\/ ...     }     cassandra {         \/\/ ...     } }<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u0441\u0435 \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"kotlin\">val webApp = webApplication {     enable(loggingConfig)     enable(myFeatureConfig)     enable(webConfig) }  fun main() {     webApp.run() }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<pre><code class=\"kotlin\">@Test fun `My feature integration test`() {     val testApp = application {         enable(loggingConfig)         enable(myFeatureConfig)     }     \/\/ ... }<\/code><\/pre>\n<h3>\u041f\u043b\u0430\u043d\u044b \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435<\/h3>\n<p>\u0412 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/milestone\/10\"><u>\u0432\u0435\u0440\u0441\u0438\u0438 0.4.0<\/u><\/a> \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044f <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/tree\/master\/autoconfigure-adapter\"><u>autoconfigure-adapter<\/u><\/a> \u043d\u0430 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-init\/\"><u>spring-init<\/u><\/a>&nbsp;\u2014 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <a href=\"https:\/\/spring.io\/team\/dsyer\"><u>\u0414\u0435\u0439\u0432 \u0421\u0438\u0435\u0440 (Dave Syer)<\/u><\/a>&nbsp;\u0438 <a href=\"https:\/\/spring.io\/team\/aclement\"><u>\u042d\u043d\u0434\u0438 \u041a\u043b\u0435\u043c\u0435\u043d\u0442 (Andy Clement)<\/u><\/a>. \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0430\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Spring Boot \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0431\u0438\u043d\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 GraalVM \u0431\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <a href=\"https:\/\/github.com\/oracle\/graal\/issues\/2500\"><u>oracle\/graal#2500<\/u><\/a>).<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 DSL.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043d\u0443\u043b\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JaFu, \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 GraalVM \u0438 <a href=\"https:\/\/knative.dev\/\"><u>Knative<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <a href=\"https:\/\/github.com\/spring-projects\/spring-framework\/milestone\/222\"><u>Spring Framework 5.3 M1<\/u><\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 <a href=\"https:\/\/github.com\/spring-projects\/spring-framework\/issues\/25151\"><u>XML<\/u><\/a>&nbsp;\u0438 <a href=\"https:\/\/github.com\/spring-projects\/spring-framework\/issues\/25153\"><u>SpEL<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Spring Security <a href=\"https:\/\/docs.spring.io\/spring-security\/site\/docs\/current\/reference\/html5\/#kotlin-config\"><u>\u0447\u0435\u0440\u0435\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 DSL Kotlin Spring Security 5.3<\/u><\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u0432\u0430\u0448\u0438\u043c \u043e\u0442\u0437\u044b\u0432\u0430\u043c. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c \u0438 API \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u043d\u0435 \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<hr>\n<blockquote>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0443\u0440\u0441\u0435 <a href=\"https:\/\/otus.pw\/B3bW\/\"><strong>&#171;Kotlin Backend Developer<\/strong><\/a><strong>&#171;<\/strong><\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0431\u0438\u043d\u0430\u0440 <a href=\"https:\/\/otus.pw\/4C0O\/\"><strong>\u00ab\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 GraphQL \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u044d\u043a\u0435\u043d\u0434 \u043d\u0430 Kotlin\u00bb<\/strong><\/a><\/p>\n<\/blockquote>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/555292\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/555292\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u0414\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0443\u0447\u0430\u0449\u0438\u0445\u0441\u044f \u043d\u0430 \u043a\u0443\u0440\u0441\u0435 <a href=\"https:\/\/otus.pw\/B3bW\/\"><strong>&#171;Kotlin Backend Developer<\/strong><\/a><strong>&#171;<\/strong> \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u0435\u043c\u043e-\u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/4C0O\/\"><strong>\u00ab\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 GraphQL \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u044d\u043a\u0435\u043d\u0434 \u043d\u0430 Kotlin\u00bb. <\/strong><\/a>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043e\u0431\u0437\u043e\u0440 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 GraphQL, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f Kotlin \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 ktor \u0438 graphql-kotlin.  <\/p>\n<\/blockquote>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<hr>\n<p>\u0421\u043f\u0435\u0448\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0434\u043e\u0441\u0442\u043d\u043e\u0439 \u043d\u043e\u0432\u043e\u0441\u0442\u044c\u044e&nbsp;\u2014 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0432\u044b\u0448\u0435\u043b <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/\"><u>Spring Fu<\/u><\/a> \u0432\u0435\u0440\u0441\u0438\u0438 0.3.0. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043d\u043a\u0443\u0431\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spring Boot \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Domain-specific_language\"><u>DSL<\/u><\/a>. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h3>JaFu \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f!<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/tree\/master\/jafu\"><u>JaFu<\/u><\/a> (DSL Java) \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/tree\/master\/kofu\"><u>KoFu<\/u><\/a> (DSL Kotlin). \u042f \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 JaFu \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 0.1.0, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0432\u0443\u0445 DSL&nbsp;\u2014 Java \u0438 Kotlin. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f API, \u044f \u043d\u0435 \u0431\u044b\u043b \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430 Java \u0441\u0442\u043e\u0438\u043b \u043c\u043e\u0438\u0445 \u0443\u0441\u0438\u043b\u0438\u0439, \u043d\u043e \u044f \u043f\u0435\u0440\u0435\u0434\u0443\u043c\u0430\u043b \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<ul>\n<li>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>Java \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>JaFu \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u043e \u0438 \u0434\u043b\u044f Kotlin-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 JVM \u0438 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-graalvm-native\"><u>\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 GraalVM<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041a \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430:&nbsp;<a href=\"https:\/\/spring.io\/team\/aneveu\"><u>\u041e\u0434\u0440\u0438 \u041d\u0435\u0432\u0435 (Audrey Neveu)<\/u><\/a> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0434 KoFu, \u0430 <a href=\"https:\/\/spring.io\/team\/apoutsma\"><u>\u0410\u0440\u044c\u0435\u043d \u041f\u0443\u0442\u0441\u043c\u0430 (Arjen Poutsma)<\/u><\/a>&nbsp;\u2014 \u043d\u0430\u0434 JaFu. \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c!<\/p>\n<\/li>\n<\/ul>\n<h4>\u0414\u0440\u0443\u0433\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043b\u0438\u043d\u0438\u044e <a href=\"https:\/\/spring.io\/blog\/2020\/05\/15\/spring-boot-2-3-0-available-now\"><u>Spring Boot 2.3.0<\/u><\/a> \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c API. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/milestone\/8?closed=1\"><u>\u0442\u0443\u0442<\/u><\/a>.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 Spring Fu 0.3.0 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0431-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043c\u043e\u0435\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 OpenJDK 11 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e: Started Application in 0.673 seconds (JVM running for 0.898).<\/p>\n<h4>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 JaFu \u0438 Kofu<\/h4>\n<p>Spring MVC \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a\u0430\u043a \u0434\u043b\u044f Java, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f Kotlin. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Spring Boot, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u0438\u0445 DSL.<\/p>\n<p>\u041d\u0430 JaFu:<\/p>\n<pre><code class=\"kotlin\">public class Application {  \tpublic static JafuApplication app = webApplication(a -&gt; a.beans(b -&gt; b \t\t.bean(SampleHandler.class) \t\t.bean(SampleService.class)) \t\t.enable(webMvc(w -&gt; w \t\t\t.port(w.profiles().contains(\"test\") ? 8181 : 8080) \t\t\t.router(router -&gt; { \t\t\t\tSampleHandler handler = w.ref(SampleHandler.class); \t\t\t\trouter \t\t\t\t\t.GET(\"\/\", handler::hello) \t\t\t\t\t.GET(\"\/api\", handler::json); \t\t\t}).converters(c -&gt; c \t\t\t\t.string() \t\t\t\t.jackson(j -&gt; j.indentOutput(true))))));  \tpublic static void main (String[] args) { \t\tapp.run(args); \t} }<\/code><\/pre>\n<p>\u041d\u0430 KoFu:<\/p>\n<pre><code class=\"kotlin\">val app = webApplication { \tbeans { \t\tbean&lt;SampleService&gt;() \t\tbean&lt;SampleHandler&gt;() \t} \twebMvc { \t\tport = if (profiles.contains(\"test\")) 8181 else 8080 \t\trouter { \t\t\tval handler = ref&lt;SampleHandler&gt;() \t\t\tGET(\"\/\", handler::hello) \t\t\tGET(\"\/api\", handler::json) \t\t} \t\tconverters { \t\t\tstring() \t\t\tjackson { \t\t\t\tindentOutput = false \t\t\t} \t\t} \t} }  fun main() { \tapp.run() }<\/code><\/pre>\n<h4>\u0421\u0440\u0435\u0437\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0412\u0441\u044f \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0437\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u0442\u0440\u0438 \u0441\u0440\u0435\u0437\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>webConfig<\/code>,&nbsp;<code>loggingConfig<\/code>&nbsp;\u0438 <code>myFeatureConfig<\/code>:<\/p>\n<pre><code class=\"kotlin\">val webConfig = configuration {     webMvc {         \/\/ ...     } }  val loggingConfig = configuration {     logging {         level = LogLevel.WARN     } }  val myFeatureConfig = configuration {     beans {         \/\/ ...     }     cassandra {         \/\/ ...     } }<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u0441\u0435 \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"kotlin\">val webApp = webApplication {     enable(loggingConfig)     enable(myFeatureConfig)     enable(webConfig) }  fun main() {     webApp.run() }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<pre><code class=\"kotlin\">@Test fun `My feature integration test`() {     val testApp = application {         enable(loggingConfig)         enable(myFeatureConfig)     }     \/\/ ... }<\/code><\/pre>\n<h3>\u041f\u043b\u0430\u043d\u044b \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435<\/h3>\n<p>\u0412 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/milestone\/10\"><u>\u0432\u0435\u0440\u0441\u0438\u0438 0.4.0<\/u><\/a> \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043c\u0435\u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044f <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-fu\/tree\/master\/autoconfigure-adapter\"><u>autoconfigure-adapter<\/u><\/a> \u043d\u0430 <a href=\"https:\/\/github.com\/spring-projects-experimental\/spring-init\/\"><u>spring-init<\/u><\/a>&nbsp;\u2014 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <a href=\"https:\/\/spring.io\/team\/dsyer\"><u>\u0414\u0435\u0439\u0432 \u0421\u0438\u0435\u0440 (Dave Syer)<\/u><\/a>&nbsp;\u0438 <a href=\"https:\/\/spring.io\/team\/aclement\"><u>\u042d\u043d\u0434\u0438 \u041a\u043b\u0435\u043c\u0435\u043d\u0442 (Andy Clement)<\/u><\/a>. \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0430\u0432\u0442\u043e\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Spring Boot \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0431\u0438\u043d\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 GraalVM \u0431\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <a href=\"https:\/\/github.com\/oracle\/graal\/issues\/2500\"><u>oracle\/graal#2500<\/u><\/a>).<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 DSL.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043d\u0443\u043b\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JaFu, \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 GraalVM \u0438 <a href=\"https:\/\/knative.dev\/\"><u>Knative<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <a href=\"https:\/\/github.com\/spring-projects\/spring-framework\/milestone\/222\"><u>Spring Framework 5.3 M1<\/u><\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 <a href=\"https:\/\/github.com\/spring-projects\/spring-framework\/issues\/25151\"><u>XML<\/u><\/a>&nbsp;\u0438 <a href=\"https:\/\/github.com\/spring-projects\/spring-framework\/issues\/25153\"><u>SpEL<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Spring Security <a href=\"https:\/\/docs.spring.io\/spring-security\/site\/docs\/current\/reference\/html5\/#kotlin-config\"><u>\u0447\u0435\u0440\u0435\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 DSL Kotlin Spring Security 5.3<\/u><\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u0432\u0430\u0448\u0438\u043c \u043e\u0442\u0437\u044b\u0432\u0430\u043c. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c \u0438 API \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u043d\u0435 \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<hr>\n<blockquote>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0443\u0440\u0441\u0435 <a href=\"https:\/\/otus.pw\/B3bW\/\"><strong>&#171;Kotlin Backend Developer<\/strong><\/a><strong>&#171;<\/strong><\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0431\u0438\u043d\u0430\u0440 <a href=\"https:\/\/otus.pw\/4C0O\/\"><strong>\u00ab\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 GraphQL \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u044d\u043a\u0435\u043d\u0434 \u043d\u0430 Kotlin\u00bb<\/strong><\/a><\/p>\n<\/blockquote>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/555292\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/555292\/<\/a><br \/><\/br><\/br><\/hr>\n<\/p>\n<\/blockquote>\n<\/div>\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-322913","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322913","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=322913"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322913\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}