Kotlin SpringBoot – Configure Spring Security
In the tutorial, JavaSampleApproach will show you how to configure Security for Kotlin SpringBoot web application.
I. Technologies
– Kotlin 1.2.20
– Apache Maven 3.5.2
– Spring Tool Suite – Version 3.9.0.RELEASE
– Spring Boot – 1.5.10.RELEASE
– Bootstrap
II. Goal
We create a Kotlin MVC Web Application as below:
With 5 urls:
– '/': access with everyone.
– '/user': must authenticate and be accessed with user ROLE {USER, ADMIN}
– '/admin': accessed by user with role Admin
– '/login': login page
– '/403': HTTP Error 403 Forbidden
III. Practice
Step to do:
– Create Kotlin Spring Boot project
– Create Controller
– Create View Pages
– Configure WebSecurity
Top comments (0)