spring framework Simple study memo (1): ApplicationContext, Bean, Autowired

spring framework Simple study memo (1): ApplicationContext, Bean, Autowired

Essence

--Avoid new class --IoC, DI, Dependency Injection

Way of thinking

--Container definition (ApplicationContext) --Container definition (Bean)

Definition method

--A, JAVA base --B, XML based --C, annotation base ★

JAVA base

-@Configuration (container side) -@Bean (container side)

XML based

--From XML file

Annotation base

-@Configuration (container side) -@ComponentScan (container side) -@Component (container side)

Bean reference

@Autowired

@ComponentScan

Bean scope

Understanding different scope issues

--Consideration from the essence of the generated instance --Using scoped proxy

Disposal of container

--Explicitly close context.close()

Split Config

Configuration profiling

Recommended Posts

spring framework Simple study memo (1): ApplicationContext, Bean, Autowired
spring framework Simple study memo (2): AOP
[Personal memo] About Spring framework
Play Framework Study Memo Database ①
Spring Framework bean definition XML: custom tag
Spring Framework study notes [Part 1] DI container
[Memo] JSUG Study Group 2020 Part 1 Spring x Kotlin
Spring retrospective memo
Play Framework study
spring bean wiring annotation difference @Required @Autowired @Qualifier @Resource