Add Controller Kotlin sample for form login

Issue gh-8172
This commit is contained in:
Eleftheria Stein 2020-09-25 15:38:11 +02:00
parent a6d19474c4
commit 669587409f
1 changed files with 14 additions and 2 deletions

View File

@ -197,8 +197,8 @@ A minimal sample `LoginController` can be see below:
.LoginController
====
.src/main/java/example/LoginController.java
[source,java]
.Java
[source,java,role="primary"]
----
@Controller
class LoginController {
@ -208,4 +208,16 @@ class LoginController {
}
}
----
.Kotlin
[source,kotlin,role="secondary"]
----
@Controller
class LoginController {
@GetMapping("/login")
fun login(): String {
return "login"
}
}
----
====