anchor.diff:  for more details and up to date informations.
   ====
   
  -== Kotlin Script templates
  +== Web
  +
  +=== WebFlux Functional DSL
  +
  +Spring Framework 5 comes with a
  +{doc-root}/spring-framework/docs/{spring-version}/kdoc-api/spring-framework/org.springframework.web.reactive.function.server/-router-function-dsl/[Kotlin routing DSL]
  +that allows you to leverage the <<reactive-web#webflux-fn,WebFlux functional API>> with clean and idiomatic Kotlin code:
  +
  +[source,kotlin]
  +----
  +router {
  +  accept(TEXT_HTML).nest {
  +    GET("/") { ok().render("index") }
  +    GET("/sse") { ok().render("sse") }
  +    GET("/users", userHandler::findAllView)
  +  }
  +  "/api".nest {
  +    accept(APPLICATION_JSON).nest {
  +      GET("/users", userHandler::findAll)
  +    }
  +    accept(TEXT_EVENT_STREAM).nest {
  +      GET("/users", userHandler::stream)
  +    }
  +  }
  +  resources("/**", ClassPathResource("static/"))
  +}
  +----
  +
  +[NOTE]
  +====
  +This DSL is programmatic, thus also allows custom registration logic of beans via `if` expression,
  +`for` loop or any other Kotlin constructs. That can be useful when routes need to be registered
  +depending on dynamic data, for example created via the backoffice.
  +====
  +
  +See https://github.com/mixitconf/mixit/tree/bad6b92bce6193f9b3f696af9d416c276501dbf1/src/main/kotlin/mixit/web/routes[MiXiT project routes]
  +for a concrete example.
  +
  +=== Kotlin Script templates
   
   As of version 4.3, Spring Framework provides a
   http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/view/script/ScriptTemplateView.html[ScriptTemplateView]
  
positive.code: See https://github.com/sdeleuze/kotlin-script-templating[kotlin-script-templating] example
  project for more details.
  
  == Getting started
  
  The easiest way to start a new Spring Framework 5 project in Kotlin is to create a new Spring
  Boot 2 project on https://start.spring.io/#!language=kotlin[start.spring.io].
  
  It is also possible to create a standalone WebFlux project as described in
  https://spring.io/blog/2017/08/01/spring-framework-5-kotlin-apis-the-functional-way[this blog post].
  
  === Choosing your web flavor
  
  Spring Framework now comes with 2 different web stacks: <<web#mvc,Spring MVC>> and
  <<reactive-web#spring-web-reactive,Spring WebFlux>>.
  
  Spring WebFlux is recommended if you want to create applications that will deal with latency,
  long-lived connections, streaming scenarios or simply if you want to use the web functional
  Kotlin DSL.
  
  For other use cases, Spring MVC and its annotation-based programming model is a perfectly
  valid and fully supported choice.
  
  === Final by default
  
  
negative.code: of type `Foo` must be registered in the application context while `@Autowired lateinit var foo: Foo?`
  won’t raise an error if such bean does not exist.
  
  == Bean definition DSL
  
  Spring Framework 5 introduces a new way to register beans in a functional way using lambda
  as an alternative to XML or JavaConfig with `@Configuration` and `@Bean`. In a nutshell,
  it makes it possible to register beans with a lambda that acts as a `FactoryBean`.
  It is very efficient and does not require any reflection or CGLIB proxies.
  
  In Java you will for example write:
  
  