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 / CATATAN</>
Spring02 Jul 2026

How do I use external configuration with Spring?

External configuration means keeping settings such as application names, URLs, ports, feature flags, credentials, or environment-specific values outside your Java code. Spring supports this mainly through: application.properties application.yml environment variables command-line arguments external property files @Value @ConfigurationProperties 1. Using application.properties In a Spring or Spring Boot application, you can place configuration in: src/main/resources/application...

Wayan · 5 menit baca
SPRING / CATATAN</>
Spring02 Jul 2026

How do I manage bean scope in Spring?

In Spring, bean scope controls how many instances of a bean Spring creates and how long those instances live. By default, Spring beans are singleton scoped, meaning Spring creates one shared instance per ApplicationContext. Common Spring Bean Scopes Scope Meaning singleton One shared instance per Spring container prototype A new instance every time the bean […]

Wayan · 6 menit baca
SPRING / CATATAN</>
Spring02 Jul 2026

How do I inject dependencies using constructor injection?

Use constructor injection by declaring your dependency as a private final field and accepting it as a constructor parameter. Spring will create the dependency bean and pass it into the constructor automatically. Example: import org.springframework.stereotype.Component; @Component public class MyDependency { public void doSomething() { System.out.println("Dependency logic executed."); } } import org.springframework.stereotype.Service; @Service public class MyService […]

Wayan · 2 menit baca
SPRING / CATATAN</>
Spring02 Jul 2026

How do I use @Component, @Service, and @Repository correctly?

Short Answer Use these annotations according to the role of the class: Annotation Use for Typical layer @Component Generic Spring-managed class Utility/infrastructure/helper @Service Business logic Service layer @Repository Data access / persistence Repository/DAO layer All three make the class a Spring bean, meaning Spring can create it, manage it, and inject it into other beans. […]

Wayan · 6 menit baca
SPRING / CATATAN</>
Spring02 Jul 2026

How do I understand the Spring ApplicationContext?

The Spring ApplicationContext is the central runtime container of a Spring application. In simple terms: ApplicationContext is the object that holds your Spring application together. It knows: which objects Spring should manage how those objects are created how dependencies are injected which configuration values are available which beans need lifecycle callbacks which features like transactions, […]

Wayan · 8 menit baca
SPRING / CATATAN</>
Spring02 Jul 2026

How do I use component scanning in Spring?

Component scanning is how Spring automatically finds your classes and registers them as beans. Instead of manually creating every bean, you annotate classes with Spring stereotypes like: @Component @Service @Repository @Controller @RestController Then Spring scans selected packages, finds those classes, creates bean instances, and makes them available for dependency injection. 1. Basic Example import org.springframework.stereotype.Service; […]

Wayan · 7 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.