Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

SPRING JDBC / CATATAN</>
Spring JDBC03 Jul 2026

How do I use JDBC with Spring?

You can use JDBC with Spring through Spring’s JDBC support, especially JdbcTemplate. It removes much of the repetitive JDBC boilerplate such as opening connections, closing resources, handling PreparedStatement, iterating ResultSet, and translating SQLException into Spring’s DataAccessException hierarchy. The typical setup is: Configure a DataSource Create a JdbcTemplate Inject it into a repository/DAO class Use it […]

Wayan · 8 menit baca
SPRING DATA JPA / CATATAN</>
Spring Data JPA03 Jul 2026

How do I connect Spring to a database?

To connect Spring to a database, the usual modern approach is: Add database-related dependencies. Configure the database connection properties. Create an entity. Create a repository. Use the repository from a service or controller. The simplest way is with Spring Boot + Spring Data JPA. 1. Add Maven Dependencies For a Spring Boot application using JPA, […]

Wayan · 4 menit baca
SPRING MVC / CATATAN</>
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 menit baca
SPRING MVC / CATATAN</>
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 menit baca
SPRING MVC / CATATAN</>
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 menit baca
SPRING MVC / CATATAN</>
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 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

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

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.