Framework/SPRING
-
Reactive Programming and WebFluxFramework/SPRING 2020. 7. 5. 18:21
1. Overview Reactive programming is about non-blocking, event-driven applications that scale with a small number of threads, with backpressure being a key ingredient that aims to ensure producers don't overwhelm consumers. The primary benefits of reactive programming are: increased utilization of computing resources on multicore and multi-CPU hardware and increased performance by reducing serial..
-
Component ScanningFramework/SPRING 2020. 5. 23. 19:46
1. Overview With Spring, we use the @ComponentScan annotation along with @Configuration annotation to specify the packages that we want to be scanned. @ComponentScan without arguments tells Spring to scan the current package and all of its sub-packages. Note that the main application class is also a bean as it's annotated with @Configuration, which is a @Component. Also, note that the main appli..
-
Comparison between Field, Setter, and Constructor InjectionFramework/SPRING 2020. 5. 23. 12:01
1. Overview In the Spring Framework, the Dependency Injection comes in three types. Those are Field Injection, Setter Injection, and Constructor Injection. You can absolutely use any of them and they result in exactly the same outcome. However, based on ease, readability, coding standards, or better coding practices there are few differences. Before we jump into see what those differences are, v..
-
Bean Definition OverridingFramework/SPRING 2020. 5. 23. 11:50
1. Overview Bean with the same name as another one, which is processed later, overrides the older one, but it’s not clear at all which one will be processed later. The mechanism which caused us so much confusion is called bean overriding. It is used when Spring encounters a declaration of a bean with the same name as another bean already existing in the context. 2. Example 2.1 Example 1 @SpringB..
-
Application ContextFramework/SPRING 2020. 4. 10. 23:38
1. Overview Application-context in spring means nothing but it is the core component of spring container in spring framework. Ideally, we can say application-context one of the Spring Containers in Spring Framework and another container is bean-factory. The configuration for application-context is loaded by one of the concrete implementations of ApplicationContext interface. The ApplicationConte..
-
Portable Service Abstraction (PSA)Framework/SPRING 2020. 3. 6. 09:47
1. Overview Spring Framework helps implementing technical aspects of the application like security and transactions in a declarative way by providing annotations to capture settings for those aspects. When creating the object tree, it then decorates the instance 2. Example 2.1 Security and Transactions Spring components using services like security and transactions @Component class MyService { p..
-
Dependency Injection (DI)Framework/SPRING 2020. 3. 5. 19:24
1. Overview for dependency injection, Spring can automatically wire up your objects together. So basically what'll happen is that Spring will look for a class that matches a given property. And it'll actually match by type, so the type could be either the class or the interface. Once Spring finds a match, then it'll automatically inject it. Hence it's called Autowired. 2. Dependency Injection wi..
-
Spring Inversion of Control (IoC)Framework/SPRING 2020. 2. 6. 15:30
1. Overview Inversion of Control is a principle in software engineering by which the control of objects or portions of a program is transferred to a container or framework. The container will create the objects, wire them together, configure them, and manage their complete life cycle from creation till destruction. The responsibilities of IoC container are: Instantiating the bean Wiring the bean..