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 / NOTES</>↗
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 min read
SPRING / NOTES</>↗
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 min read
SPRING / NOTES</>↗
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 min read
SPRING / NOTES</>↗
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 min read
SPRING / NOTES</>↗
Spring02 Jul 2026

How do I configure Spring using Java configuration?

Spring Java configuration lets you configure your application using Java classes instead of XML. The main annotations are: @Configuration — marks a class as a Spring configuration class @Bean — declares a Spring bean manually @ComponentScan — tells Spring where to find annotated components @PropertySource — loads external properties @Enable… annotations — enable specific Spring […]

Wayan · 4 min read
SPRING / NOTES</>↗
Spring01 Jul 2026

How do I create and manage beans in Spring?

In Spring, a bean is an object managed by the Spring container. Spring is responsible for: creating the object injecting its dependencies managing its lifecycle applying configuration destroying it when the application shuts down The container that manages beans is usually the ApplicationContext. 1. What Is a Spring Bean? A Spring bean is just a […]

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