Add Controller Kotlin sample for form login
Issue gh-8172
This commit is contained in:
parent
a6d19474c4
commit
669587409f
|
@ -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"
|
||||
}
|
||||
}
|
||||
----
|
||||
====
|
||||
|
|
Loading…
Reference in New Issue