SPRING / CATATAN</>↗Spring02 Jul 2026
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 […]
SPRING / CATATAN</>↗Spring01 Jul 2026
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 […]
SPRING / CATATAN</>↗Spring01 Jul 2026
In Spring, Dependency Injection (DI) means you let the Spring container create and provide the objects your class depends on, instead of manually creating them with new. The recommended approach in modern Spring is constructor injection. 1. Define a dependency as a Spring bean import org.springframework.stereotype.Component; @Component public class EmailSender { public void send(String message) […]
SPRING / CATATAN</>↗Spring01 Jul 2026
The easiest way to understand what the Spring Framework actually does is to stop thinking of it as “magic” and start thinking of it as infrastructure code that your application delegates to. At a high level: Spring creates objects, wires them together, manages their lifecycle, and adds common behavior around them so you do not […]
KOTLIN / CATATAN</>↗Kotlin01 Jul 2026
When working with deeply nested nullable data in Kotlin, the goal is to keep code both safe and understandable without building long, fragile chains or overusing !!. 1. Avoid very long safe-call chains when they hide meaning This is safe: val city = user?.profile?.address?.city ?: "Unknown" For simple reads, that is perfectly fine. But if […]
KOTLIN / CATATAN</>↗Kotlin01 Jul 2026
In Kotlin Flow code, scope functions are useful, but they should usually play a supporting role. The main structure of your reactive pipeline should come from Flow operators such as map, filter, flatMapLatest, combine, onEach, catch, and stateIn. A good rule of thumb: Flow operators describe the stream. Scope functions describe what you do with […]