Posts

Showing posts with the label kotlin

Ktor Hello World Example

Image
In the section, we will create a project for Hello Word Example. Step 1: Open Ktor Initializr  https://start.ktor.io/ Step 2: Provide the Project Name We have provided ktor-helloworld. Step 3: Provide the Website name. We have provided the com.knf.dev . Step 4: Provide the Artifact Id. We have provided the dev.knf.com.ktor-helloworld . Step 5: Click on the Add plugins button. Step 6: Click on the Generate project button.  Step 7: Extract the ZIP file. Step 8: Import the project folder When the project imports successfully, it shows the following project directory in the Package Explorer section of the IDE. Project Directory Routing.kt package dev.com.knf.plugins import io.ktor.server.routing.* import io.ktor.http.* import io.ktor.server.application.* import io.ktor.server.response.* import io.ktor.server.request.* fun Application . configureRouting () { routing { get ( "/" ) { call .respondText( "Hello World!" ) } } } Copy Applica

Registration and Login with Kotlin + Spring Security + Thymeleaf

Image
Hello everyone, I hope you all are well, today we will learn how to create user registration and login using Kotlin,  Spring security,  Thymeleaf, JPA, and H2DB. GitHub repository link is provided at the end of this tutorial. You can download the source code. Technologies used: Spring Boot  makes developing the web applications and microservices with Spring Framework faster and easier through three core capabilities: 1.  Autoconfiguration 2. An opinionated approach to configuration 3. The ability to create standalone applications Kotlin   is an open-source statically typed programming language. It is object-oriented and supports functional programming features. It is designed for the JVM (Java Virtual Machine) Spring Security  is a Java/Java EE framework that provides authentication, authorization, and other security features for enterprise applications. Thymeleaf  is a modern server-side Java template engine for both web and standalone environments. Maven  is a build automation tool u