SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

SPRING MVC / NOTES</>↗
Spring MVC03 Jul 2026

How do I handle exceptions globally in Spring MVC?

In Spring MVC, handle exceptions globally by creating a class annotated with @ControllerAdvice or @RestControllerAdvice and adding methods annotated with @ExceptionHandler. For REST APIs, prefer @RestControllerAdvice, because it combines @ControllerAdvice and @ResponseBody, so returned objects are serialized as JSON automatically. package com.example.demo.exception; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springfr...

Wayan · 2 min read
SPRING MVC / NOTES</>↗
Spring MVC03 Jul 2026

How do I validate form data in Spring?

In Spring MVC, the standard way to validate form data is to use Jakarta Bean Validation annotations on a form/DTO object, then check validation results in your controller with BindingResult. Since your project uses Jakarta EE, use jakarta.validation.* imports. 1. Add validation annotations to your form object Example form/DTO: import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; […]

Wayan · 4 min read
SPRING MVC / NOTES</>↗
Spring MVC03 Jul 2026

How do I handle HTTP requests with Spring controllers?

In Spring MVC or Spring Boot, you handle HTTP requests by creating controller classes. A controller receives a request, runs application logic, and returns either: a view name for server-rendered pages, or data such as JSON for REST APIs. 1. Basic Spring MVC Controller Use @Controller when you want to return views such as JSP, […]

Wayan · 6 min read
SPRING MVC / NOTES</>↗
Spring MVC03 Jul 2026

How do I build a web application using Spring MVC?

Building a Web Application Using Spring MVC A Spring MVC web application is typically built around these pieces: DispatcherServlet — the front controller that receives HTTP requests. Spring MVC configuration — enables MVC and configures controllers, view resolution, static resources, etc. Controllers — handle web requests. Services — contain business logic. Repositories — handle persistence, […]

Wayan · 12 min read
KOTLIN / NOTES</>↗
Kotlin03 Jul 2026

How do I understand the coroutine lifecycle in Kotlin?

Kotlin coroutine lifecycle: the mental model A Kotlin coroutine is a lightweight concurrent task that runs inside a CoroutineScope and is controlled by a Job. The lifecycle is mostly about the state of that Job. At a high level: New → Active → Completing → Completed ↘ Cancelling → Cancelled Most of the time, you […]

Wayan · 6 min read
KOTLIN / NOTES</>↗
Kotlin03 Jul 2026

How do I cancel a coroutine in Kotlin safely?

In Kotlin, you cancel a coroutine safely by calling cancel() on its Job or scope, and making sure the coroutine code is cooperative: it should suspend regularly or check for cancellation. Basic example import kotlinx.coroutines.* fun main() = runBlocking { val job = launch { try { repeat(1_000) { i -> println("Working $i") delay(500) // […]

Wayan · 2 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.